Duplicate Content aka 301 redirect from .com to .com/index.html
-
Moz reports are telling me that I have duplicate content on the home page because .com and .com/index.html are being seen as two pages. I have implemented 301 redirect using various codes I found online, but nothing seems to work. Currently I'm using this code.
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^jacksonvilleacservice.com
RewriteRule ^index.html$ http://www.jacksonvilleacservice.com/ [L,R=301]Nothing is changing. What am I doing wrong? I have given it several weeks but report stays the same. Also according to webmasters tools they can't see this as duplicate content. What am I doing wrong?
-
Thank you very much. I have implemented your suggestions and we'll see how it goes. Thanks again.
-
All of the answers here have pretty much outlined what you should do in this situation, but I thought I'd sum it all up here:
-
You probably don't need to redirect /index.html to www.jacksonvilleacservice.com of the website for the homepage, since it can be tricky. Instead, make sure that:
-
All internal links pointing to the homepage go to ttp://www.jacksonvilleacservice.com rather than the /index.html page
-
The homepage canonicals to the www.jacksonvilleacservice.com with_out_ the /index.html
-
If you want to be doubly sure, you can use the code Doug provided.
-
Other commenters have also noticed, a potentially bigger issue is that you're creating two copies of your site by allowing visitors to reach your site with or without a "www" before the URL. For that you will need to create a 301 redirect, and you should canonical to be doubly sure.
Good luck!
-
-
My preference tends to be to redirect such pages to the domain rather than the other way round. You'll find that people naturally link to the domain (without the path) so making that the canonical version makes sense. It also means that you can future-proof your site somewhat. (What happens when your change the content management system and instead of an index.html for your home page, you've not got an index.php page...)
So, my recommendation would be to make sure that all internal links to the home page on your own site point to http://www.jacksonvilleacservice.com/ and set up a redirect from the index.html to the domain.
Then you'd use something like the following to redirect the index.html to the main page:
RewriteCond %{THE_REQUEST} ^./index.html
RewriteRule ^(.)index.html$ http://www.example.com/$1 [R=301,L]Another tool to check your headers and that your redirects are in place is: http://web-sniffer.net/
It also appears that you've got a problem with both the www and non-www versions of the page responsing with a 200 response code.
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]If you look at your inbound links using Open Site Explorer, you'll see that you've got a mix of links pointing to either http://www.jacksonvilleacservice.com/ or http://jacksonvilleacservice.com/.
(There don't appear to be any external links show in OSE linking to your /index.html page)
-
Ok, first thing let’s not reply on report only and check some online 301 redirection checker to see if your redirection code is working or not! Here is a tool by SEObook that allows you to check the header status of any URL http://tools.seobook.com/server-header-checker/
Redirection code is very much depends upon what website are you using like PHP, wordpress, ASP or anything else the redirection code will be different as PHP and ASP are different languages and for WP there are tons of plugins that can do your work!
My advice would be to search for “how to redirect (website’s language)” and I am sure there will be some articles that have explained the step by step process. Hope this helps!
Hope this helps!
-
A 301 redirect for this can be tricky, as the other responses have said in this thread, it can create an infinite redirect loop. I'm pretty sure it can be done, but I don't have enough technical know-how to tell you what's wrong with your conf code there.
A simple way around this is to put a rel=canonical tag in the of your home page, pointing at your root directory (i.e. "/"). You can include this in the in the file, so it'll show up when the page is accessed under both / and for /index.html. The HTML for this would look like: . Make sure your internal links point to the canonical version, as this method may lose you a little pagerank (pagerank coming from /index.html to /).
You have a canonicalization problem for your subdomain too... meaning you're serving the same content for both http://www.jacksonvilleacservice.com (with www) and http://jacksonvilleacservice.com (without www). I'd pick one, and then do 301 redirects from one to the other, rather than solving that issue with canonical tags.
-
I agree with Eric it would be a good idea to link to your root domain and not the specific file. You can just link to yourdomain.com or build your links to your homepage using code similar to the following: Home.
I have also seen instances where yourdomain.com and www.yourdomain.com are treated as separate pages and cause similar problems. It appears you are using www.yourdomain.com so while you are messing with 301 redirects you might want to add one from yourdomain.com to www.yourdomain.com for all URLs in case a link is made to yourdomain.com.
-
Since index.html is most likely your home page (it's the default home page on your web server), then you really don't need to set up a 301 Permanent Redirect in this situation. The only thing you need to do is make sure that on your website you don't have any links pointing to www.yourdomain.com/index.html. Rather, all of those links should be pointing to www.yourdomain.com as the home page.
If you set up a redirect from index.html to your site's home page www.domain.com then you'll probably create a "loop" that won't work. If you find all the links to /index.html and fix those then that will be enough to take care of this.
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
-
What constitutes duplicate content on a page?
I am working on SEO for a Shopify store. Their products are very similar, hence the pages are so similar that Moz shows them as duplicate content. The only difference in the product pages is the title and model number. I am going to "go for the gold" and try re-writing all the product descriptions. It's incredibly difficult due to the products being nearly identical with just a minor variation. I know I could go down the road of just creating variants --- but the customer is not down for that. Here's my question: what constitutes duplicate content? 80% of the content, 90%???? If I can going to re-write the descriptions, what should I aim for? Thank you!
On-Page Optimization | | steve_linn1 -
Do permanent redirect solve the issue of duplicate content?
Hi, I have a product page on my site as below. www.mysite.com/Main-category/SubCatagory/product-page.html This page was accessible in both ways as below. 1. www.mysite.com/Main-category/SubCatagory/product-page.html 2. www.mysite.com/Main-category/product-page.html This was causing duplicate title issue. So i permanently redirected one to other. But after more than a month and after many crawls, webmaster tools html improvement still shows duplicate title issue. My question is that do permanent redirect solve duplicate content issue or something i am missing here?
On-Page Optimization | | Kashif-Amin0 -
Duplicate Content
Part of a site I am working on, features many different bags in all thicknesses colors and sizes. I'm getting an error when some pages have different content like different thicknesses. The only differences between the pages are a single digit - but in trash bags that makes it a whole different product! I can't do a canonical because it's not the same. For example: http://www.plasticplace.net/index.php?file=productdetail&iprod_id=274 and http://www.plasticplace.net/index.php?file=productdetail&iprod_id=268 Any ideas?
On-Page Optimization | | EcomLkwd0 -
Duplicate page content
what is duplicate page content, I have a dating site and it's got a groups area where the members can base there discussions in a category like for an example, night life, health and beauty, and such. why would this cause a problem of duplicate page content and how would I fix it. explained in the terms of a dummy.
On-Page Optimization | | clickit2getwithit0 -
Does Google index dynamically generated content/headers, etc.?
To avoid dupe content, we are moving away from a model where we have 30,000 pages, each with a separate URL that looks like /prices/<product-name>/<city><state>, often with dupe content because the product overlaps from city to city, and it's hard to keep 30,000 pages unique, where sometimes the only distinction is the price & the city/state.</state></city></product-name> We are moving to a model with around 300 unique pages, where some of the info that used to be in the url will move to the page itself (headers, etc.) to cut down on dupe content on those unique 300 pages. My question is this. If we have 300 unique-content pages with unique URL's, and we then put some dynamic info (year, city, state) into the page itself, will Google index this dynamic content? The question behind this one is, how do we continue to rank for searches for that product in the city-state being searched without having that info in the URL? Any best practices we should know about?
On-Page Optimization | | editabletext0 -
Html code for none .index
In the diagnostic I have several errors in Duplicate Page Content and Title. The thing is that the errors is on the same page but with "different" names. One is called http://siteX.com/ another is called http://www.siteX.com/ and the same third one is called
On-Page Optimization | | mato
http://www.siteX.com/index.html How do I go about changing all three sites, I have changed the /index.html one but dont know how to catch the other once. Is it possible, if it is I would like to know how?0 -
Correct use of Canonical link vs 301 redirect
Hi All, Seeking yet more advice. SEOMOZ tools have told me I have duplicate content on one of my sites and I am keen to clean this up. I am not to familiar with the following so thought I would ask. The duplicate content is shown on : www.mysite.com www.mysite.com/index.html Obviously I only see index.html when I check the code so what is the best method of resolving the duplicate content, Canonical or 301? Can you give me an example 🙂 Thanks all
On-Page Optimization | | wedmonds0 -
Archetecture to avoid content duplicate
Hi, I have lots of duplicate stuff and I need a better site architecture. http://www.furnacefilterscanada.com/ We are selling furnace filters. All furnace filters are sold in 50 different sizes, each sizes comes in 3 different qualities, Bronze, Silver and Gold. Total: 150 products. Right now I have created many categories and subcategories for furnace filters sizes. When the client pickup is sizes, he will end-up to the products page with 3 different options, Bronze, Silver and Gold. They can then compare the filter a select the one he wants to purchase. The problem is, it is not possible to provide different content for each filters, Gold has a description, Silver has another one and also Bronze. The only text that will change in the descriptions, is the filter size. This makes Duplicates text description. Not good when you what to index your site. The positive things to 150 different products, is the page title. example 16x25x4 furnace filters. Those exacte tem get search in Google. A new site architecture with 3 categories, Gold, Silver and Bronze & 50 variables by products (filters sizes) might not be the best options, because no filter size will be index. Can you please help me to find the best architecture in a SEO point of view? Also what about the top navigation bar menu, what is the best options in using it? Right now it is use for Legal, Contact, Policy and I fill it is a wast, those page only get less then 1% clicks. It might be more convenient to use those for categories for example, what is your recommendations in a SEO point of view? Can I create a information page in the left navigation menu and includ all the standard page, like: Policy, Legal ... If I do, will I get penalize by Google? Thank you for your help. We have puts lots of money in AdWords before, but now the next step is to come home organics. I'm using SEOmoz tools, read there new book, and I want increase traffic. I just need your help. Thank you, BigBlaze
On-Page Optimization | | BigBlaze2050