Duplicate page content and title
-
hi,
i have a serious issue with my site. my website contains 21 pages. but during my weekly report, moz found 84 errors. i.e 42 errors in duplicate page content and 42 errors in duplicate page title... when i see the error in details.. all my 21 links are displaying twice. for examplehttp://domain.com/
http://domain.com/page1.html
http://domain.com/page2.html
and
http://www.domain.com/
http://www.domain.com/page1.html
http://www.domain.com/page2.htmlso, the same link is repeating twice with www and without www. how do i resolve this error? so please kindly anyone help me....
-
Hi Ravi
Basically, you want to instruct the web crawlers to visit only one version of the site. You can do this my adding the following code into your .htaccess file:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.your-domain.com$
RewriteRule ^(.*)$ http://www.your-domain.com/$1 [R=301]Obviously replace "your-domain.com" with whatever your URL is.
That code will make sure you are redirected to the www. version of each page. I'd ensure that every on-page link on your website links with the www. version for consistency, in order to avoid unneccesary redirects.
Alternatively, if your site is running WordPress, installing the Yoast SEO Plugin will do this process for you automatically.
Hope this helps.
-
This post is deleted! -
This post is deleted!