I have a website located on
www.website.com
some of the pages have a rewrite proxy rule pointing to
sub.website.com
(a wordpress installation which resides on a different server)
so for example;
www.website.com/some-article.aspx shows content from => sub.website.com/articles/some-article/
(and the address remains untouced)
The problem is Google will index both of the pages, which creates duplicate content.
I only want google to index this page: www.website.com/some-article.aspx
Anyone have experience on the subject, or got an idea?
Thanks.
Several SEO plugins for WordPress add the canonical tag to a page that will tell search engines which one of your domains contains the official version. Once activated there should be no issue.
Most search engines now support canonical link elements in the head section, so on your sub.website.com wordpress installation, you would need to create a wordpress plugin that would add this element for each page, with the correct canonical URL. Something like:
If you do not want any content on the
sub.website.com
indexed, you can create a robots.txt file in the root directory ofsub.website.com
and add the following entry.If you only want to restrict some directories e.g
/articles
change it toIf the root directory of
sub.website.com
is shared with any other site e.g.www.website.com
, then see this post for instructions on how to modify your .htaccess to serve the correct robots.txt