How best to deal with www.home.com and www.home.com/index.html
-
Firstly, this is for an .asp site - and all my usual ways of fixing this (e.g. via htaccess) don't seem to work.
I'm working on a site which has www.home.com and www.home.com/index.html - both URL's resolve to the same page/content.
If I simply drop a rel canonical into the page, will this solve my dupe content woes?
The canonical tag would then appear in both www.home.com and www.home.com/index.html cases.
If the above is Ok, which version should I be going with?
- or -
Thanks in advance folks,
James @ Creatomatic -
It certainly does help, many thanks Paul - hugely appreciated.
-
In this situation, using a canonical to point to the primary is a workaround, but the correct way to handle it is with a 301 redirect. Canonicals are to be used when both versions of the page need to be indexed, but all the influence is to be directed to a single URL.
In this case, there is no functional reason why you would want both URLs to remain in the index and be reachable by the two different addresses because they are the exact same page. Therefore the correct solution is to 301 redirect the /index.html URL to the primary URL. (This will also be cleanest to maintain, will pass maximum amount of authority, and is best for usability)
ASP sites are hosted on Microsoft IIS servers. IIS does not use or recognize .htaccess files. Instead, you will need to use the URL Rewrite Module. It should be preinstalled on most IIS servers, or you can request that your host/server admin add it. (If the server's older than IIS 7, you'll need a 3rd part ISAPI Rewrite module instead of Microsoft's own module)
Here's a TechRepublic article on using the Rewrite Module to perform the same sorts of functions as .htaccess on Apache servers. http://ow.ly/fXSAB In many ways, its basics are easier than .htaccess.
Note you should also be redirecting the non-www version of the site to the fully qualified domain name as well if you haven't already
Hope this helps?
Paul
-
That's correct - they are the same page.
To better explain, this is all done old-school via FTP, so any edits or changes I make to the file/page "index.html" apply to the following URL's
Is there any harm in telling search engines that the Canonical version of a page IS the same page?
(Actually, there were LOADS more but I've got fixes in place for most of these)
-
Adam, unfortunately the method you link to won't work, because the two URLs in question here are actually the same page. If this were handled this way, you'd be creating an infinite redirect looping in on itself.
Paul
-
Hi James,
First, run a crawl on your site. Is the /index.html getting picked up in the crawl? If so then it is being linked to internally. Check the navigation bar(s) to see if the link to 'Home' is linking to /index.html. Once you have found all the internal links linking to /index.html, you will then need to change these to point to the home page without the filepath (e.g. http://www.example.com/).
The second step would be to implement a canonical tag on both pages that point to the home page without the filepath. So in your example that would be as follows:
That is one way of solving any duplicate content issues without using 301 redirects via .htaccess. However, I believe there is a way to do this via .asp but you would have to search around for this. I did a quick search and found this page that might be of help.
Hope that helps,
Adam.
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
-
Pages not indexed
Hey everyone Despite doing the necessary checks, we have this problem that only a part of the sitemap is indexed.
Technical SEO | | conversal
We don't understand why this indexation doesn't want to take place. The major problem is that only a part of the sitemap is indexed. For a client we have several projects on the website with several subpages, but only a few of these subpages are indexed. Each project has 5 to 6 subpages. They all should be indexed. Project: https://www.brody.be/nl/nieuwbouwprojecten/nieuwbouw-eeklo/te-koop-eeklo/ Mainly subelements of the page are indexed: https://www.google.be/search?source=hp&ei=gZT1Wv2ANouX6ASC5K-4Bw&q=site%3Abrody.be%2Fnl%2Fnieuwbouwprojecten%2Fnieuwbouw-eeklo%2F&oq=site%3Abrody.be%2Fnl%2Fnieuwbouwprojecten%2Fnieuwbouw-eeklo%2F&gs_l=psy-ab.3...30.11088.0.11726.16.13.1.0.0.0.170.1112.8j3.11.0....0...1c.1.64.psy-ab..4.6.693.0..0j0i131k1.0.p6DjqM3iJY0 Do you have any idea what is going wrong here?
Thanks for your advice! Frederik
Digital marketeer at Conversal0 -
Any idea why pages are not being indexed?
Hi Everyone, One section on our website is not being indexed. The product pages are, but not some of the subcategories. These are very old pages, so thought it was strange. Here is an example one one: https://www.moregems.com/loose-cut-gemstones/prasiolite-loose-gemstones.html If you take a chunk of text, it is not found in Google. No issues in Bing/Yahoo, only Google. You think it takes a submission to Search Console? Jeff
Technical SEO | | vetofunk1 -
Best Topography for eCommerce Site Product Pages (flat nav/off the root OR in products subfolder) ?
Hi Im SEO'ing a Shopify site (new/not yet live) at the moment and all the products are in a 'Products' subfolder along the lines of: domain.com/products/blue-widgets/ etc I understand that many ecommerce SEO's these days go 'Flat Navigation' with all products 'off the root' rather than in a sub folder. Then they communicate product & categories/departmental relationships via breadcrumbs & other internal linking etc In the case of a platform like Shopfy is this a good idea or is it best to leave 'as is' and the 'Products' subfolder is a perfectly good place for the product pages ? All Best Dan
Technical SEO | | Dan-Lawrence0 -
WMT "Index Status" vs Google search site:mydomain.com
Hi - I'm working for a client with a manual penalty. In their WMT account they have 2 pages indexed.If I search for "site:myclientsdomain.com" I get 175 results which is about right. I'm not sure what to make of the 2 indexed pages - any thoughts would be very appreciated. google-1.png google-2.png
Technical SEO | | JohnBolyard0 -
Has anyone tested or knows whether it makes a difference to upload a disavow file to both www. and non-www. versions of your site in GWMT?
Although Google treats both as separate sites, I always assumed that uploading the disavow file to the canonical version of your site would solve the problem. Is this the case, or has anyone seen better results uploading to both versions?
Technical SEO | | CustardOnlineMarketing0 -
Canonical tag for Home page: with or without / at the end???
Setting up canonical tags for an old site. I really need advice on that darn backslash / at the end of the homepage URL. We have incoming links to the homepage as http://www.mysite.com (without the backslash), and as http://www.mysite.com/ (with the backslash), and as http://www.mysite.com/index.html I know that there should be 301 redirects to just one version, but I need to know more about the canonical tags... Which should the canonical tag be??? (without the backslash) or (with the backslash) Thanks for your help! 🙂
Technical SEO | | GregB1230 -
301 Redirect question www to root.com
I have a site that has been up for a few weeks now and is currently in a www format and i am considering changing it to just mydomain.com I also have quite a few directory listings (including google places/bing) for this site w/ the www. url. If i do this, change it in my google analytics, and update my wordpress internal page + htaccess file. Will i lose any of the link juice i had from my www pages? Would this be something that would be advised since i've registered for many sites, or is there a potential that this could end up hurting me? Thanks,
Technical SEO | | tgr0ss0 -
Rel=Canonical, WWW vs non WWW and SEO
Okay so I'm a bit of a loss here. For what ever reason just about every single Wordpress site I has will turn www.mysite.com into mysite.com in the browser bar. I assume this is the rel=canonical tag at work, there are no 301s on my site. When I use the Open Site Explorer and type in www.mysite.com it shows a domain authority of around 40 and a few hundred backlinks... and then I get the message. Oh Hey! It looks like that URL redirects to XXXXXX. Would you like to see data for <a class="clickable redirects">that URL instead</a>? So if I click to see this data instead I have less than half of that domain authority and about 2 backlinks. *** Does this make a difference SEO wise? Should my non WWW be redirecting to my WWW instead because that's where the domain authority and backlinks are? Why am I getting two different domain authority and backlink counts if they are essentially the same? Or am I wrong and all that link juice and authority passes just the same?
Technical SEO | | twilightofidols0