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
-
Duplicate content? - Ecommerce reviews loading the same products on every page
Hello there! I use a plugin on my ecom site that shows customer reviews - not product reviews but general shopping experience reviews. The plugin also loads links and short descriptions of products those customers bought. Having installed it site-wide, on every page there are short descriptions of the same products. Of course, as people leave new reviews the content changes (but it doesn't happen very often). So the question is: Is having links and short descriptions of the same products on every page harmful for SEO in this case? I'd be grateful for any insight into this matter.
On-Page Optimization | | thpchlk0 -
Will I have duplicate content on my own website?
Hello Moz community, We are an agency providing services to various industries, and among them the hair salon industry. On our website, we have our different service pages in the main menu, as usual. These service pages are general information and apply to any industry.We also have a page on the website that is only intended for the hair salon industry. On this page, we would like to link new service pages: they will be the same services as our “general” services, but specialized for hair salons. My questions relate to duplicate content: Do we have to make the new individual service pages for hair salons with completely different text, even though it’s the same service, in order to avoid having duplicate content? Can we just change a few words from the “general service” page to specifically target hair salons, and somehow avoid Google seeing it as duplicate content? Reminder that these pages will be internal links inside of the hair salon industry page. Thank you in advance for your answers, Gaël
On-Page Optimization | | Gael_Regnault0 -
Duplicate content query
I'm currently reauthoring all of the product pages on our site. Within the redesign of all the pages is a set of "why choose us?" bullet points and "what our customers say" bullet points. On every page these bullet points are the same. We currently have 18% duplicate content sitewide and I'm reluctant to push this. The products are similar but targeted at different professions, so I'm not sure whether to alter the text slightly for the bullet points on each page, remove the bullet points entirely or implement some form of canonicalisation that won't impact the profession-specific pages' ability to rank well.
On-Page Optimization | | EdLongley0 -
301 redirects. If new website is a different business does it still send link authority?
Hi Guys. I'm a music producer and studio owner. I want to start a new business for online music mixing. Instead of starting from scratch I want to use a 301 redirect from my previous site that has built up a little authority over the years. However, the old site is purely for my music studio, there is no mention of online mixing services. Will Google consider this 'odd'? Pass less link juice? Or perhaps pass no authority at all if Google 'decides' the 2 business are unrelated? Cheers in advance guys. Isaac.
On-Page Optimization | | isaac6630 -
Duplicate Content on Category Pages
Hi Everyone, I have a few category pages within a category for my eCommerce store and I've recently started writing a short description for each. However a lot of these paragraphs can be replicated for the same category. For instance '1 Inch thickness' I'll show all the information, and it'll be very similar to '2 inch thickness' but obviously one is 1 inch and one is 2 inch so I would only be changing one keyword and that is the thickness. I feel that this is helping customers because it has all the information in each category e.g. how to filter your choices. But it might be duplicate content. What would you recommend?
On-Page Optimization | | EcomLkwd0 -
Meta Data definition for multiple pages. Potential duplicate content risk?
Hi all, One of our clients needs to redefine their meta title and description tags. They publish very similar information almost every day, so the structure they propose is the following: Structure 1: Type of Analysis + periodicity + data + brand name Examples 1: Monthly Market Analysis, 1/5/2012 - Brand Name Weekly Technical Analysis, 7/5/2012 - Brand Name Structure 2: Company Name + investment recommendation + periodicity Example 2: Iberdrola + investment recommendation (this text doesn't vary) + 2T12 (wich means 2012, 2nd trimestrer) Regarding meta description they want to follow a similar approach, replicating every time the same info with a slight variation for each publication. I'm afraid this may cause a duplicate content problem because of the resemblance of every "Market Analysis" done or every "Investment recommendation" done in the future. My initial suggestion for them is to define specific and unique meta data for each page, but this is not possible for them given the time it takes to do it for every page. Finally, I ask them to specify the data in each meta title of content published, in order to add something different each time and avoid duplicate content penalty. Will this be enough to avoid duplicate content issues? Thanks in advance for your help folks! Alex
On-Page Optimization | | elisainteractive0 -
Duplicate Content - Site Wide or Internet Wide?
Hello... I am creating a new website and i was wondering how you guys would define duplicate content? If my new site had the same page titles and descriptions as my existing site, would that be duplicate content? Or does duplicate content mean same titles and descriptions in the same site? I'm wondering if i can upload the same database (with page titles and descriptions and alt tags) to my new site or if that would be looked at as duplicate... Thanks
On-Page Optimization | | Prime850 -
Duplicate Content Warning
Hi Mozers, I have a question about the duplicate content warnings I am recieving for some of my pages. I noticed that the below pattern of URLs are being flagged as duplicate content. I understand that these are seen as two different pages but I would like to know if this has an negative impact on my SEO? Why is this happening? How do I stop it from happening? http://www.XXXX.com/product1234.html?sef_rewrite=1 http://www.XXXX.com/product1234.html Thanks in advance!
On-Page Optimization | | mozmonkey0