Is it possible to when a user type


that the url change for


or better that all request go to



1 Answer 1


Yes, it is possible and it is a well known process often called as setting up your preferred (canonical) destination.

You should use 301 redirects to send traffic from the non-www URLs to the www URLs. It is a good practice also if use Search Console to set your preferred domain.

To implement a 301 redirect for websites that are hosted on servers running Apache, you'll need access to your server's .htaccess file. (If you're not sure about your access or your server software, check with your webhoster.) For more information, consult the Apache .htaccess Tutorial and the Apache URL Rewriting Guide. If your site is hosted on a server running other software, check with your hoster for more details.

Read more here


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