Prevent Google from indexing iframes while allowing indexing iframe content embedded in other pages

Prevent Google from indexing iframes while allowing indexing iframe content embedded in other pages - Google Search Console is a free application that allows you to identify, troubleshoot, and resolve any issues that Google may encounter as it crawls and attempts to index your website in search results. If you’re not the most technical person in the world, some of the errors you’re likely to encounter there may leave you scratching your head. We wanted to make it a bit easier, so we put together this handy set of tips about seo, google-search, iframe, to guide you along the way. Read the discuss below, we share some tips to fix the issue about Prevent Google from indexing iframes while allowing indexing iframe content embedded in other pages.Problem :


Let's assume there's an HTML page hosted on http://programmer-domain.example/iframe.html, containing text "SDFHIASDFASDFKSDAF".



Let's assume there's also another page, http://customer-domain.example/index.html, that includes this first page via an iframe tag.



As it's known, Google indexing engine indexes the iframes in a way if you google for "SDFHIASDFASDFKSDAF", both pages will be shown in results.



How can this be achieved that only the page in customer-domain.example is indexed, but not the programmer-domain.example one? I guess using noindex in HTML tags of iframe.html, or Disallow-ing in robots.txt of programmer-domain.example will result in no pages being indexed.


Solution :

You could try to set a canonical tag to your parent document. Add the following to the head of your iframe:



<link rel="canonical" href="https://your-parent-document" />


This is a signal to search engines that your parent doc is the preferred resource.



These questions might be of interest for you:




If the issue about seo, google-search, iframe, is resolved, there’s a good chance that your content will get indexed and you’ll start to show up in Google search results. This means a greater chance to drive organic search traffic to your site.

Comments

Popular posts from this blog

Years after news site changed name, Google is appending the old name to search titles and news stories

Is it possible to outrank Google for a search term on their own search engine?

Load Wikipedia sourced biographies via Ajax or render it with the rest of the page as part of the initial request?