user11364702
user11364702

Reputation:

How to embed a website in my site's blog?

I have a site with a blog and using an embed code:

<embed src="https://www.timeout.com/london/things-to-do/the-best-life-drawing-classes-in-london" style="width:500px; height: 300px;"</embed>

This works fine. But when I try:

<embed src="http://anyamountofbooks.com" style="width:500px; height: 300px;"</embed>

It doesn't work.

The site exists but, when I view the page on my blog, it says, 'this site may be down.

Upvotes: 1

Views: 91

Answers (1)

Xhynk
Xhynk

Reputation: 13890

Typically you'll want to use an <iframe> instead of <embed> to display HTML content. Take a look at this answer for some more in depth analysis. Now to the root of your problem.

If you're embedding external content into your site (such as by iframe/embed), you'll need to make sure that the protocols match:

  • An http:// website can embed both http:// and https:// content.
  • An https:// website can ONLY embed https:// content.

The http://anyamountofbooks.com website doesn't appear to have a valid SSL certificate, so you won't be able to frame it if your website is secured and accessed through https://.

The other thing to consider is that some websites don't allow themselves to be embedded, here's on article on a couple ways to do it. The website you're trying to embed may employ one of those practices to prevent itself from being embedded.

Upvotes: 1

Related Questions