I frame not displaying on Wordpress

user1784
Rookie
0 Votes

Hi, I'm having trouble displaying the iframe on wordpress, it displays like this if not logged in.
this is the error on the console "Refused to display 'https://lp.constantcontactpages.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'."

Screenshot 2024-05-07 at 9.44.34 AM.png

1 REPLY 1
user771653
Rookie
0 Votes

@user1784healthinsurancemarketwrote:

Hi, I'm having trouble displaying the iframe on wordpress, it displays like this if not logged in.
this is the error on the console "Refused to display 'https://lp.constantcontactpages.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'."

Screenshot 2024-05-07 at 9.44.34 AM.png


Hello,

 

Hello! The error message you’re seeing indicates that the webpage you’re trying to embed within an iframe has set the X-Frame-Options HTTP header to sameorigin. This means that the page can only be displayed in a frame on the same origin as the page itself. If you’re trying to embed content from another domain, the browser will block it for security reasons.

 

Here are a few steps you can take to resolve this issue:

 

Check the External Site’s Policy: Verify if the external site allows being embedded. Some sites explicitly disallow embedding their pages on other domains for security reasons.


Contact the External Site: If you own the external site or have permissions, you can change the X-Frame-Options header to ALLOW-FROM https://yourwordpresssite.com to allow embedding on your specific WordPress site.


Use a Plugin: If you’re not able to change the headers, consider using a WordPress plugin designed to help with embedding content that might otherwise be blocked.


Modify .htaccess: For advanced users, you can try adding the following to your .htaccess file to unset the X-Frame-Options header:

 

<IfModule mod_headers.c>
   Header always unset X-Frame-Options
</IfModule>

 

Alternative Content: If none of the above solutions work, you might need to look for alternative ways to display the content, such as linking directly to the page instead of embedding it.

 

I hope the information may helps you. 

 

 

 

Updates
Just Getting Started?

We’re here to help you grow. With how-to tutorials, courses, getting-started guides, videos and step-by-step instructions to start and succeed with Constant Contact.

Start Here

73% of SMBs express doubt that their marketing strategy is effective. Does this sound familiar? Read our Small Business Now Report to learn how you can tweak your strategy to see better results.

Go read our article
Upcoming Webinars
JUN 27
Boost Your Email Results with Segmentation & Personalization
2PM - 3PM EST
JUL 10
Getting Started with the Constant Contact Community
2PM - 3PM EST