My website is currently showing as www.example.com on Google Search. Instead I would like it to be example.com. My DNS servers are properly configured.

What I recently did is adding this line into the head of my index page :

<link rel="canonical" href="https://example.com" />

After that I went on the Google Search Console page and applied a re-index for my website (I re-indexed www.example.com and example.com).

Unfortunately I don't see any results for the moment, the link on Google Search is still www.example.com.

(In the sitemap section, I only added example.com/sitemap.xml and I did not add the www link. Should I add both just in case or just let the one I want ?)

What should I do ? Should I add a permanent redirect with a .htaccess file from www.example.com to example.com ?

  • Are you checking just the home page, or are you checking the search results for several deep pages as well? Apr 19, 2023 at 15:33
  • How long has it been since you added the canonical? What does "recently" mean? Apr 19, 2023 at 15:33
  • @StephenOstermiller I'm just checking the home page, it's basically my one-page portfolio. I added the canonical this morning and just after deploying the change I requested to index my page again via Google Search Console
    – Hello
    Apr 19, 2023 at 15:37
  • 1
    It takes at least two weeks for Google to react to any changes you make. I'd recommend waiting a month to see if your canonical change was effective. Apr 19, 2023 at 15:40

3 Answers 3


you should have the possibility to setup an access to your domain without a subdomain in the domain configuration settings offered by your hoster, like cPanel or similar. If not, you are forced to create a redirect in the server configuration (htaccess for Apache, nginx.conf for Nginx)

  • I can access my domain both ways (www and non-www) without any issues. It's just the Google Search Result is indexing the www one and it's not the one I want. Should I still create the redirect for Google to acknowledge it ? I found out thanks to the comment on my original post that Google takes 2 weeks to take my changes into account. Maybe the canonical link might work after the delay has passed ? Hmm..
    – Hello
    Apr 19, 2023 at 15:43
  • 1
    redirect will force reindexing - canonical not always. Thats why redirect is recommended in such cases.
    – Evgeniy
    Apr 20, 2023 at 12:12

Google Search has not been subject to competitive evolutionary pressures for many years now (because the initial performance of their Page Rank technology was superior to existing engines), so they apparently do pretty much whatever flips their bibby at a given moment (take a look at marsupials or Microsoft Windows for other examples of the result of a lack of competition).

Why do I make this criticism? I have two websites which have been up and well-known for over ten years. They both appeared at top of SERP in any search engine prior to my remimplementation in March at a new host. GSC (Google Search Console) complained about wanting canonical url or the like (claiming duplicate content, blah blah blah), so I settled on using the naked domain, i.e., without the so-called "machine designation" (www). My local .htaccess files at both sites happily redirect any incoming http://target.com, https://target.com, https://www.target.com etc. into the index.html page (secure connection https though there is no eCommerce or login involved, just forced into SSL by another Google demand basically). I added <link rel="canonical" ... in the <head> at both sites, as well as an xml sitemap defining my preferred location URL for each page of the site.

DuckDuckGo and Bing (I hate to recommend Bing, their idiot child "AI" frantically trying to anticipate my thoughts and making typing in my query clumsy, as admittedly Google does as well) both maintain the top SERP position on my name form, as they should, I being the author who chose the resource identifier that best fits the nature of the concept being defined in mapping the location of my site with its semantics (see Roy Fielding's 2000 PhD dissertation. That concept is simply me, i.e., my name at one and the other my business (IT support, retire now) name known for twenty years.

Google, however, accepts one of my site URLs without www prefix (though perversely displaying sites that refer to my content prior to my canonical site) but demands that I change the other URL to use the www prefix, i.e.,tells me in GSC that they prefer to display that (to which I ask, then why don't you just display www then? my redirect gets you to the site one way or the other).

In apparent fit of pique, Google search now refuses to display the second site at all in SERP on the terms that previously showed top of page (though as I say, those terms still locate me top of SERP in other search engines as before), and as an additional finger in my eye, instead they display sites that link to my site instead.

Yeah, I know, if this was a matter of business (money) I would just cave in to Google's demand for www on the second site, but I have always resented the arbitrary exercise of authority and refuse to do it (instead just providing links to my site wherever I am active online, and recommending people use another search engine if they prefer to search for me instead).

So my answer then is that you may have to use www prefix if you want to satisfy Google (though this is apparently not a consistent demand there).


When you configure www to return a 301, eventually that spelling will be dropped from Google, because Google does not index redirects. But it can take weeks to months until that happens.

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.