Unable to Load External Websites Inside UI Page via <iframe> in ServiceNow

HarikaNakhate
Tera Contributor

I'm attempting to embed an external website inside a ServiceNow UI Page using an <iframe>. The goal is to keep users within the platform while displaying external content (such as https://www.google.com) directly in the portal interface. 

 

What I've Tried

  • Created a UI Page with a named <iframe> and a hyperlink pointing to the external URL

  • Verified ServiceNow instance settings:

    • Set glide.set_x_frame_options = false in sys_properties

    • Added Content-Security-Policy response headers like: Content-Security-Policy: frame-ancestors 'self' external_link;

  • Configured CORS rules under System Web Services > CORS Rules 

  • Attempted to use HTTP Response Headers to load the link without an iframe

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@HarikaNakhate 

sometimes 3rd party websites don't allow their URL to be embedded within iframe due to security restrictions.

They won't allow their content to be embedded into other sites to avoid clickjacking attack. 

You need to check with that website.

See the browser console error it clearly says it's not allowed by google or youtube

see this for more details

X-Frame-Options header 

 

AnkurBawiskar_0-1751955401740.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@HarikaNakhate 

sometimes 3rd party websites don't allow their URL to be embedded within iframe due to security restrictions.

They won't allow their content to be embedded into other sites to avoid clickjacking attack. 

You need to check with that website.

See the browser console error it clearly says it's not allowed by google or youtube

see this for more details

X-Frame-Options header 

 

AnkurBawiskar_0-1751955401740.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Given that the third-party vendor is an internal site, how can we integrate it?