Newer Version Available
Putting Visualforce Pages on External Domains
In Setup, search for Session Settings. Under Clickjack Protection, select Enable clickjack protection for customer Visualforce pages either with headers disabled or with standard headers. Both these options allow framing on trusted external domains and provide clickjack protection.
Then under Trusted Domains for Inline Frames, add the trusted external domains where you allow framing and set the iframe type to Visualforce Pages. Ensure that your domain names meet format requirements. You can add up to 512 external domains.
After you add external domains to the list, Visualforce pages render with the X-Frame-Options and Content-Security-Policy HTTP headers set to allow framing by those domains.
This code shows how to frame a Visualforce page on an external domain.
1<html>
2 <head></head>
3 <body>
4 <iframe src="https://MyDomainName--PackageName.vf.force.com/apex/iframe"></iframe>
5 </body>
6</html>