Duplicate content issue in SEOmoz campaign.
-
Hi,
We are running a campaign for a website in SEOmoz.
We get a dup content issue warning:
http://www.oursite.com and http://www.oursite.com/ are being seen as 2 different urls.
Only difference among 2 urls is the trailing slash at the end of the second url.
Why is this happening? I was aware of www vs non www but never heard of an issue related to the slash.
Thanks for your help!
-
Nice to know this. I have had the same issue arise out of nowehre about week maybe two back. It took awhile but I found the same htaccess quick fix but it seems as if it was an seomoz alogorithim change up. Robot Roger works his butt off in the basment or so seomoz tells me he must have found some free time to switch up the campaign errors alogorithim.
-
#removes trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} !^.localhost$ [NC]
RewriteRule ^(.+)/$ http://%{HTTP_HOST}$1 [R=301,L]Above code segment removes trailing slashes, second code block is doing redirection from non-www to www.
In order for above code to work you will need to add two lines above it, telling Apache to enable rewrite module.
Options +FollowSymlinks
RewriteEngine onSo with that combined here is how your .htaccess file should look like
Options +FollowSymlinks
RewriteEngine on#removes trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} !^.localhost$ [NC]
RewriteRule ^(.+)/$ http://%{HTTP_HOST}$1 [R=301,L]If you are using non-Apache server such as IIS let me know and I send you configuration for it.
Kind regards
Bojan
-
So, this code:
#removes trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} !^.localhost$ [NC]
RewriteRule ^(.+)/$ http://%{HTTP_HOST}$1 [R=301,L]and this code:
REDIRECT to canonical url
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]should be added to our .htaccess ?
Or is it just one of the two code blocks?
Thanks for your time!
-
From search engine perspective http://www.oursite.com and http://www.oursite.com/ are not the same thing.
This problem however is easily fixed, If you are using apache it's a matter of simple config file modification.
You can refer to http://www.seomoz.org/q/how-can-i-prevent-duplicate-content-between-www-page-com-and-www-page-com for more information.
Kind regards
Bojan
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Duplicate Page content | What to do?
Hello Guys, I have some duplicate pages detected by MOZ. Most of the URL´s are from a registracion process for users, so the URL´s are all like this: www.exemple.com/user/login?destination=node/125%23comment-form What should I do? Add this to robot txt? If so how? Whats the command to add in Google Webmaster? Thanks in advance! Pedro Pereira
On-Page Optimization | | Kalitenko20140 -
Duplicate Content
Is making tabs with general product information on similar products considered duplicate content?
On-Page Optimization | | BridalHotspot0 -
Footer Content
We currently have footer content contained in a single php include file and is included in every page and contains the following: Most recent 3 tweets from our twitter feed Snippets of our 3 most recent blogs posts navigation links to our main pages (essentially the same as our main navigation in the header) Is this good/bad?
On-Page Optimization | | NeilD0 -
Creating Duplicate Content on Shopping Sites
I have a client with an eCommerce site that is interested in adding their products to shopping sites. If we use the same information that is on the site currently, will we run into duplicate content issues when those same products & descriptions are published on shopping sites? Is it best practice to rewrite the product title and descriptions for shopping sites to avoid duplicate content issues?
On-Page Optimization | | mj7750 -
Duplicate content
crawler shows following links as duplicate http://www.mysite.com http://mysite.com http://www.mysite.com/ http://mysite.com. http://mysite.com/index.html How can i solve this issue?
On-Page Optimization | | bhanu22170 -
Duplicated Page Content
I have encountered this weird problem about duplicate page content. My site got 3 duplicate content similar on the link structure below. If I'm going to use rel canonical does it help to resolve the duplication problem? Thanks http://www.sample.com http://www.sample.com/ http://www.sample.com/index.php
On-Page Optimization | | mattvectorbpo0 -
Duplicate Page Content and Duplicate Page Title
Hi All, I'm new in SEOMoz and have some questions after I have already spend 2-3 days trying to resolve the problems identified from Crawling one of my clients websites. I get quite a lot of Duplicate Page Conntent and Page Titles warnings and trying to find a workaround through the forums and posts. I continuously get this error on most of my pages: URL: http://domain.com/benefits with the same Page but with a WWW in front URL: http://www.domain.com/benefits Any advice will be highly appreciated. Thanks, Athos
On-Page Optimization | | athosk0 -
Duplicate page title and content
Hello, I have an ecommerce store where we offer many similar products, and the main difference could be the color or memory storage. Due to this reason my main problem appears to be be duplicate page title and content. What is the best way to correct this issue? I cant make them different neither. I always include this particular difference in title or description. I guess it is not enough? any way to fix it? thanks!
On-Page Optimization | | tolyadem10