: How to set www as the preferred domain for a HTTPS website? I have a website which has URL of kind https://www.example.com (Please notice HTTPS and www). It is the only correct URL of the
I have a website which has URL of kind www.example.com (Please notice HTTPS and www). It is the only correct URL of the website and I also have SSL certificate for www URL only.
I have added my website in Google webmaster and is able to view results on Google search. The problem is that I can see both www.exmaple.com results and also example.com results. I want users to see only www.example.com results (i.e. with www in URL).
I have checked on net and found some solutions which is not working in my case:
Having 301 redirect to www URL - Not able to do that as I have SSL certificate for www URL and before I can make a redirect the user will have to trust the untrusted certificate, the same problem that amazon.com have
I am not able to set preferred domain on google webmaster as well, as it is not giving me an option to do so, it says Restricted to root level domains only.
Having canonical links on my webpage would be an difficult thing to do in my case.
Please suggest some solution.
Edit: I am not able to see preferred domain option for my site.
More posts by @Samaraweera270
1 Comments
Sorted by latest first Latest Oldest Best
If you look into the Site Configuration section of Google webmaster tools and click on Settings you can choose how your domain appears in search results.
Regarding the error message 'Restricted to root level domains only' Google's Johnathan Mueller appears to concede that it's a bug in this thread on the Google product forum (2010) but there doesn't appear to be word on a fix.
Check that your domains are still verified as this may be the source of the error, outside of that there doesn't appear to be much you can do to solve the problem with webmaster tools.
As an alternative you could implement code like this:-
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.mydomain.com$ [NC]
RewriteRule ^(.*)$ www.mydomain.com/ [R=301,L]
In your .htaccess file. This forces any visitor to your site to use only one version of the url, essentially this says 'if the domain is NOT mydomain.com, then redirect to mydomain.com'.
Then try implementing the the canonical microformat (if you can) to let Google know which your preferred url for the content is.
Thing is the old urls will still remain visible in the search engine unless you manually remove them, but with the htaccess code any visitors, including bots, will end up in the right place going forward.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.