Duplicate Content - Home Page even wth Mod Rewrite 301
-
Hi,
It looks like Seomoz (and Screaming Frog) is showing my home page as duplicate content.
http://www.mydomain.com Page Authority 61 Linking root Domain 321
http://www.mydomain.com/ Page Authority 61 Linking root Domain 321
[Screaming Frog shows duplicate as]
www.mydomain.com/
www.mydomain.com/index.html}Years ago I hired someone to write the code for a rewrite for non www to be 301 redirected to www version. I was surprised at finding out that I still have a problem.
Here is the code on my htaccess page.
<ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.mydomain.com [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]</ifmodule>Was this code not properly written ?
One more question, we were hit hard by Panda and Penguin, would something like this be that much of a factor.
Thanks in advance,
Force7
-
Thanks for the great advice. But once you've added the non-www to www redirect as you wrote above, why not just do this in .htaccess for the ".html to /" issue?
Redirect 301 /index.html http:/www.mydomain.com/
Or
In this case if you've done the ref canonical on he "/" home page, is that good enough or do you still need to redirect /index.html to "/" ?
Thanks!
-
So if I understand correctly, I should have..
<ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.mydomain.com [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]</ifmodule>on the .htaccess and then also add
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.index.html\ HTTP/ RewriteRule ^(.)index.html$ /$1 [R=301,L]
AND
RewriteCond %{HTTP_HOST} !^.mydomain.com$ [NC] RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]
The internal linking structure of the site is as follows: main navigation is usually absolute, http://www.domain.com/page.php but throughout the site if I link a keyword i use the "/folder/page.php
When I do a "site" command on Google I see the
www.TranslationSoftware4u.com/ as the only one I saw listed
Our hits are down 70% so I am paranoid about making a mistake during the process of trying to find out how to recover from the latest update.
Appreciate the time you are taking to help answer this Matthew!
Thanks,
Force7
-
Hey, You are solving multiple problems. The code looks properly written to solve one of those problems--the naked domain to www domain redirect. So long as going to http://mydomain.com 301 redirects to www.mydomain.com, then you know that piece is working.
The second "problem" you have is that you can reach your home page with /index.html and without /index.html in the URL. So long as only one is indexed by Google, this isn't that big of a problem. You should however put in a canonical on your home page to make it clear which version you do want indexed. Then make sure all internal links go to that URL.
Alternatively, you can 301 redirect /index.html to the root via the htacess file. That code would go something like this:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.index.html\ HTTP/ RewriteRule ^(.)index.html$ /$1 [R=301,L]
The third "problem" is that your home page can be accessed with or without a trailing slash. Again, I wouldn't say this is a problem unless both versions are indexed. And, like the home page, you can fix this by adding a canonical element to the home page and link to that canonical consistently within your site.
However, this too can be fixed via htaccess. Here is an example of the htaccess code:
RewriteCond %{HTTP_HOST} !^.mydomain.com$ [NC] RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]
Thanks,
Matthew
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
-
How to 301 trailing URLs to new domain home page - wildcard?
How would I add a redirect rule so all old domain URLs redirect to a new domain? All the old pages no longer exist on a new website. The domains have been through several CMS platforms, so it would be unnecessary to recreate them. Problem is, they're indexed in search engines from the past 10 years, so it's causing a lot of 404s. Example: search "NARI Tampa Bay" and you'll find 2 old domains: nari-tampabay.com & nari-tampabay.org. The new domain is naritb.org Those 2 old domains are now pointed to the same nameservers as the new and listed as parked domains. Here's the current rules in htaccess: <code>RewriteEngine On RewriteCond %{HTTP_HOST} ^nari-tampabay.org [NC,OR] RewriteCond %{HTTP_HOST} ^www.nari-tampabay.org [NC] RewriteRule ^(.*)$ https://www.naritb.org/$1 [L,R=301] RewriteEngine On RewriteCond %{HTTP_HOST} ^nari-tampabay.com [NC,OR] RewriteCond %{HTTP_HOST} ^www.nari-tampabay.com [NC] RewriteRule ^(.*)$ https://www.naritb.org/$1 [L,R=301]</code>
Technical SEO | | CartoMark0 -
Duplicate content issue
Hi, A client of ours has one URL for the moment (https://aalst.mobilepoint.be/) and wants to create a second one with exactly the same content (https://deinze.mobilepoint.be/). Will that mean Google punishes the second one because of duplicate content? What are the recommendations?
Technical SEO | | conversal0 -
Can iFrames count as duplicate content on either page?
Hi All Basically what we are wanting to do is insert an iframe with some text on onto a lot of different pages on one website. Does google crawl the content that is in an iFrame? Thanks
Technical SEO | | cttgroup0 -
Duplicate Footer Content
A client I just took over is having some duplicate content issues. At the top of each page he has about 200 words of unique content. Below this is are three big tables of text that talks about his services, history, etc. This table is pulled into the middle of every page using php. So, he has the exact same three big table of text across every page. What should I do to eliminate the dup content. I thought about removing the script then just rewriting the table of text on every page... Is there a better solution? Any ideas would be greatly appreciated. Thanks!
Technical SEO | | BigStereo0 -
How to fix duplicate page content error?
SEOmoz's Crawl Diagnostics is complaining about a duplicate page error. The example of links that has duplicate page content error are http://www.equipnet.com/misc-spare-motors-and-pumps_listid_348855 http://www.equipnet.com/misc-spare-motors-and-pumps_listid_348852 These are not duplicate pages. There are some values that are different on both pages like listing # , equipnet tag # , price. I am not sure how do highlight the different things the two page has like the "Equipment Tag # and listing #". Do they resolve if i use some style attribute to highlight such values on page? Please help me with this as i am not really sure why seo is thinking that both pages have same content. Thanks !!!
Technical SEO | | RGEQUIPNET0 -
Strange duplicate content issue
Hi there, SEOmoz crawler has identified a set of duplicate content that we are struggling to resolve. For example, the crawler picked up that this page www. creative - choices.co.uk/industry-insight/article/Advice-for-a-freelance-career is a duplicate of this page www. creative - choices.co.uk/develop-your-career/article/Advice-for-a-freelance-career. The latter page's content is the original and can be found in the CMS admin area whilst the former page is the duplicate and has no entry in the CMS. So we don't know where to begin if the "duplicate" page doesn't exist in the CMS. The crawler states that this page www. creative-choices.co.uk/industry-insight/inside/creative-writing is the referrer page. Looking at it, only the original page's link is showing on the referrer page, so how did the crawler get to the duplicate page?
Technical SEO | | CreativeChoices0 -
Duplicate Content
We have a main sales page and then we have a country specific sales page for about 250 countries. The country specific pages are identical to the main sales page, with the small addition of a country flag and the country name in the h1. I have added a rel canonical tag to all country pages to send the link juice and authority to the main page, because they would be all competing for rankings. I was wondering if having the 250+ indexed pages of duplicate content will effect the ranking of the main page even though they have rel canonical tag. We get some traffic to country pages, but not as much as the main page, but im worried that if we remove those pages and redirect all to main page that we will loose 250 plus indexed pages where we can get traffic through for odd country specific terms. eg searching for uk mobile phone brings up the country specific page instead of main sales page even though the uk sales pages is not optimized for uk terms other than having a flag and the country name in the h1. Any advice?
Technical SEO | | -Al-0