1

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.

1

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:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.