+ Start a Discussion
Neil KimNeil Kim 

Embed visualforce page to External website

Hi all!
I'm now trying to embed visualforce page to external website(our shoppingmall).
Of course, I use force.com site and use this visualforce page that I want to show.

In this situation, I want to embed this force.com site to our shopping mall page.
When I try to open the URL at browser directly, it works fine.
However, when I embed this URL through Iframe like (src="force.com site URL"), it doesn't work.
There is only 1 grey, empty box.

Anybody can help me?

Khan AnasKhan Anas (Salesforce Developers) 
Hi Neil,

Greetings to you!

Salesforce has also implemented its own defenses to "Clickjacking" attacks within the native UI. Due to this, the iFraming of Salesforce, or the iFraming of some external websites is no longer recommended. Modern browsers are forced to defend against this new kind of attack, where framing is used by malicious attackers to compromise a browser and potentially steal customer data. 

Here's the workaround to iframes:
If you're encountering this problem, instead of using a web tab, a custom link can deliver the URL with the behavior set to:
  • Display in new window.
  • Display in existing window without sidebar or header.

Please refer to the below links which might help you further with the above issue.






I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks and Regards,
Khan Anas
Neil KimNeil Kim
@Hi Khan. Looks like I couldn't fully understand what you guide.

I changed Site page option as Allow flaming by any page (No protection).
But it still isn't loaded.

Could you please guide more in detail?