3

For some reason there are 3 or 4 pages on my site for which Google has indexed the non-www version.

I 301 redirect all requests to https and www in .htaccess but it's very odd to me that when I search for My Company Name demo that the only result for the corresponding page on my site does not have the www (https://my-company-name.com/request-demo). However if I search for My Company Name free trial, the result for the corresponding page does include the www (https://www.my-company-name.com/free-trial). The pages are almost identical in code... in fact the free trial page was created by cloning the demo page in WordPress.

Now that I have the redirect to www in place, this is no longer problematic, but for the sake of consistency, curiosity and avoiding introducing potential problems down the line (for SEO, will the www version of this page be considered "duplicate content"?), I'd love to "un-index" the non-www version and have the search results show (and link to) the www version.

Any ideas on how i can go about achieving this? And perhaps more importantly, does anyone have an explanation as to why/how this is happening?

2 Answers 2

6

If there are any links to the non-www version of the URL from anywhere then it can result in the non-canonical URL being indexed.

Also check that you have:

  • the correct rel="canonical" link element in your pages (and/or Link HTTP response header).

  • the correct URL stated in your XML sitemaps, RSS feeds, etc.

  • the correct preference set in Google Search Console: www vs non-www

Now that I have the redirect to www in place, this is no longer problematic

Although you do still need to make sure you have no internal links to the non-canonical URL.

4
  • 2
    I'd add that now that the redirects are in place, Google should stop indexing the non-www pages, although it could take a few weeks. Commented Aug 21, 2020 at 13:21
  • aaaaaah... there was in fact a few individual, non-www text links in a random, seldom used page. That was added by a previous developer - hopefully there are no external links with the same. If there are NOT, the non-www version(s) should no longer be included in search results in a couple weeks, yeah?
    – Daveh0
    Commented Aug 22, 2020 at 20:44
  • In a couple of weeks or so... it depends on how quickly Google crawls your content and sees the redirect. Every site is different.
    – MrWhite
    Commented Aug 22, 2020 at 20:48
  • 1
    @Daveh0 You could try submitting the non-www page to Google for re-indexing and it should pick up the 301 redirect sooner. I've successfully done this to push http->https redirects before, although not non-www -> www so I can't say for sure if they'd treat it the same (I can't see why they wouldn't, but this is Google... they do their own thing) EDIT - FYI, if you do decide to do this, make sure both www and non-www are in the same GSC property. Commented Aug 22, 2020 at 21:27
3

MrWhite has given a good answer about why this might be happening, but I just wanted to address the other part you mentioned:

...and avoiding introducing potential problems down the line (for SEO, will the www version of this page be considered "duplicate content"?), I'd love to "un-index" the non-www version and have the search results show (and link to) the www version.

If both the www and non-www pages are indexed then yes - Google would consider this duplicate content.

However if the 301 redirect is set up properly, then Google will eventually pick up this redirect and change the listing in the SERPs instead of indexing both.

It can take some time for it to pick it up automatically so I suggest submitting the www page for reindexing using Google Search Console.

You could also use Google Search Console to request that the non-www page is removed from the listings - it might be a drastic action, but if you are worried about duplicate content or that the redirect might not be working correctly, it might be worth considering after you take the steps MrWhite outlined in his answer.

2
  • Requesting that the page be removed through GSC would be too drastic! You should never do that - unless you really don't want the content indexed.
    – MrWhite
    Commented Aug 22, 2020 at 20:43
  • @MrWhite If Google have duplicate content listed for my site, I prefer to request its removal than wait for them to pick up on the 301 redirect and potentially penalise me for it :) Granted, this has only happened to me after changing the URLs in a redeveloped sites, they listed both versions despite the 301 after the pages were submitted for reindexing - I'm not sure if they'd list both www and non-www pages, but if it does happen it's an option. Commented Aug 22, 2020 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.