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 indexable?
Hello, I've been trying to find out why Google Search Console finds these pages non-indexable: https://www.visitflorida.com/en-us/eat-drink.html https://www.visitflorida.com/en-us/florida-beaches/beach-finder.html Moz and SEMrush both crawl the pages and show no errors but GSC comes back with, "blocked by robots.txt" but I've confirmed it is not. Anyone have any thoughts? 6AYn1TL
Technical SEO | | KenSchaefer0 -
Paginated pages are being indexed?
I have lots of paginated pages which are being indexed. Should I add the noindex tag to page 2 onwards? The pages currently have previous and next tags in place. Page one also has a self-referencing canonical.
Technical SEO | | WTH0 -
Google Indexed a version of my site w/ MX record subdomain
We're doing a site audit and found "internal" links to a page in search console that appear to be from a subdomain of our site based on our MX record. We use Google Mail internally. The links ultimately redirect to our correct preferred subdomain "www", but I am concerned as to why this is happening and if it can have any negative SEO implications. Example of one of the links: Links aspmx3.googlemail.com.sullivansolarpower.com/about/solar-power-blog/daniel-sullivan/renewable-energy-and-electric-cars-are-not-political-footballs I did a site operator search, site:aspmx3.googlemail.com.sullivansolarpower.com on google and it returns several results.
Technical SEO | | SS.Digital0 -
How to Remove /feed URLs from Google's Index
Hey everyone, I have an issue with RSS /feed URLs being indexed by Google for some of our Wordpress sites. Have a look at this Google query, and click to show omitted search results. You'll see we have 500+ /feed URLs indexed by Google, for our many category pages/etc. Here is one of the example URLs: http://www.howdesign.com/design-creativity/fonts-typography/letterforms/attachment/gilhelveticatrade/feed/. Based on this content/code of the XML page, it looks like Wordpress is generating these: <generator>http://wordpress.org/?v=3.5.2</generator> Any idea how to get them out of Google's index without 301 redirecting them? We need the Wordpress-generated RSS feeds to work for various uses. My first two thoughts are trying to work with our Development team to see if we can get a "noindex" meta robots tag on the pages, by they are dynamically-generated pages...so I'm not sure if that will be possible. Or, perhaps we can add a "feed" paramater to GWT "URL Parameters" section...but I don't want to limit Google from crawling these again...I figure I need Google to crawl them and see some code that says to get the pages out of their index...and THEN not crawl the pages anymore. I don't think the "Remove URL" feature in GWT will work, since that tool only removes URLs from the search results, not the actual Google index. FWIW, this site is using the Yoast plugin. We set every page type to "noindex" except for the homepage, Posts, Pages and Categories. We have other sites on Yoast that do not have any /feed URLs indexed by Google at all. Side note, the /robots.txt file was previously blocking crawling of the /feed URLs on this site, which is why you'll see that note in the Google SERPs when you click on the query link given in the first paragraph.
Technical SEO | | M_D_Golden_Peak0 -
Www vs no-www duplicate fix?
Hi all, I have more or less published two versions of our site. One on "www" and one without. And of course we uncovered it during our SEO crawl as "duplicate" content/titles. My guess (hope) is this is something that can be easily fixed on the server side, but I don't have a lot of knowledge around it. Does anyone know?
Technical SEO | | Becky_Converge0 -
Google Not Indexed WWW name
Here is my domain - http://www.plugnbuy.com . When i see through "site" google not showing with WWW index but the same when i do without WWW.. it is showing in search. So yesturday i changed the setting from GWM to preferred domain as a WWW appear but today still not showing anything... Please help..
Technical SEO | | mamuti0 -
How to see a theme ‘/wp-content/themes/’
HI I'm still plugging away at getting to grips with my companies personalized blog. I've been trying for the past two days to upload a theme to my own test Wordpress blog, in order to correct a bug in the companies theme that makes formatting in the Post disappear. The code in the themes CSS file seems to be fine. Anyhow what I assumed would be a simple step has given me hours of hassle. I have finally got to the point of uploading an unzipped version of the theme intot ‘/wp-content/themes/’. Now try as I might my Wordpress admin is completely blind to the fact. Any attempt at using the Upload facility (which is what I attempted many hours ago) fails. There seems to be no place to say, look out there at my directory - a new original theme - unzipped and ready to go. Am I missing something very obvious?
Technical SEO | | catherine-2793880 -
Converse.com - flash and html version of site... bad idea?
I have a questions regarding Converse.com. I realize this ecommerce site is needs a lot of seo help. There’s plenty of obvious low hanging seo fruit. On a high level, I see a very large SEO issue with the site architecture. The site is a full page flash experience that uses a # in the URL. The search engines pretty much see every flash page as the home page. To help with issue a HTML version of the site was created. Google crawls the Home Page - Converse.com http://www.converse.com Marimekko category page (flash version) http://www.converse.com/#/products/featured/marimekko Marimekko category page (html version, need to have flash disabled) http://www.converse.com/products/featured/marimekko Here is the example of the issue. This site has a great post featuring Helen Marimekko shoes http://www.coolmompicks.com/2011/03/finnish_foot_prints.php The post links to the flash Marimekko catagory page (http://www.converse.com/#/products/featured/marimekko) as I would expect (ninety something percent of visitors to converse.com have the required flash plug in). So the flash page is getting the link back juice. But the flash page is invisible to google. When I search for “converse marimekko” in google, the marimekko landing page is not in the top 500 results. So I then searched for “converse.com marimekko” and see the HTML version of the landing page listed as the 4<sup>th</sup> organic result. The result has the html version of the page. When I click the link I get redirected to the flash Marimekko category page but if I do not have flash I go to the html category page. ----- Marimekko - Converse All Star Marimekko Price: $85, Jack Purcell Helen Marimekko Price: $75 ... www.converse.com/products/featured/marimekko - Cached So my issues are… Is converse skating on thin SEO ice by having a HTML and flash version of their site/product pages? Do you think it’s a huge drag on seo rankings to have a large % of back links linking to flash pages when google is crawling the html pages? Any recommendations on to what to do about this? Thanks, SEOsurfer
Technical SEO | | seosurfer-2883190