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 Content
When I say duplicate content, I don't mean that the content on a clients site is displaying on another site on the web or taken from a site on the web. A client has a few product pages and each product page has content on the bottom of the page (4-5 paragraphs) describing the product. Now, this content is also displaying on other pages, but re-worded so it's not 100% duplicate. Some pages show a duplicate content % ranging from 12% to 35% and maybe 40%. Just curious if I should suggest having each product page less than 10% duplicated. Thanks for your help.
On-Page Optimization | | Kdruckenbrod0 -
Duplicate content - "Same" profile-information
Hi, I own a casting website with lots of profiles. Some of these profiles only typed in their firstname, email and age, when they registered on the site, and they haven't added more information ever since. From Crawl Diagnostics, I can see that there is "lots" of these profiles, which looks exactly the same (only showing age and firstname), allthought they are not the same. I could add which day the profile were created on the site, to maybe avoid these "duplications". The email will always be hidden. Or, how big an issue is this? Crawl Diagnostics tells me, that there is around 200 of these, and they are "marked" as High Priority. Any ideas on what to do? /Kasper
On-Page Optimization | | KasperGJ0 -
Content in Tabs
I speed read an article recently and forgot to save it regarding Contents on a page in tabs. Is it correct that now Google is rendering the entire page it's better not to have content in tabs hidden by Javascript? As it stands at the moment, we've got the tabs set-up so that the main part of the page containing the keyword rich text is in a tab and not the first thing presented to the user
On-Page Optimization | | Ham19790 -
Duplicate Page Content Should we 301 - Best Practices?
What would be the best way to avoid a Duplicate Page Content for these type of pages. Our website generates user friendly urls, for each page..
On-Page Optimization | | 365ToursSafaris
So it is the same exact page, just both versions of the url work.. Example: http://www.safari365.com/about-africa/wildebeest-migration http://www.safari365.com/wildebeest-migration I don't think adding code to the page will work because its the same page for the incorrect and correct versions of the page. I don't think i can use the URL parameter setting because the version with /about-africa/ is the correct (correct as it it follows the site navigation) I was thinking of using the htaccess to redirect to the correct version.. Will that work ? and does it follow best Practices ? any other suggestions that would work better ?0 -
Duplicate content "/"
Hi all, Ran my website through the SEOMOZ campaigns and the crawl diagnostics give me a duplicate error for these urls http://www.mysite.com/cat1/article http://www.mysite.com/cat1/article/ so the url with the "/" is a duplicate of the one without the "/" Can someone point me out to a solution to solve this ? regards, Frederik
On-Page Optimization | | frdrik1230 -
Should I worry about duplicate titles on pages where there is paginated content?
LivingThere.com is a real estate search site and many of our content pages are "search result" - ish in that a page often provides all the listings that are available and this may go on for multiple pages. For example, this is a primary page about a building: http://livingthere.com/building/31308-Cocoa-Exchange Because of the number of listings, the listings paginate to a second page: http://livingthere.com/building/31308-Cocoa-Exchange?MListings_page=2 Both pages have the same Page Title. Is this a concern? If so is there a "best practice" for giving paginated content different titles? Thanks! Nate
On-Page Optimization | | nate1230 -
Duplicate content
Hi everybody, I am thrown into a SEO project of a website with a duplicate content problem because of a version with and a version without 'www' . The strange thing is that the version with www. has got more than 10 times more Backlings but is not in the organic index. Here are my questions: 1. Should I go on using the "without www" version as the primary resource? 2. Which kind of redirect is best for passing most of the link juice? Thanks in advance, Sebastian
On-Page Optimization | | Naturalmente0 -
4XX results from a campaign
Hi, I recently ran a campaign and got 3 4XX (Client Error) My question is how do i find the links that are causing this errors because it seems that are no broken link on the site in question? I have tested all the links on the site Will appreciate your help thanks.
On-Page Optimization | | esuleman0