How to change how your URL displays in a web browser

To automatically re-write the URL: ‘http://your-domain.com’ to the URL: ‘http://www.your-domain.com’, customise the below rules and include them in a ‘.htaccess’ file:

RewriteEngine On 
RewriteCond %{HTTP_HOST} !^www\.your-domain\.com$ 
RewriteRule ^(.*)$ http://www.your-domain.com/$1 [R=301,QSA,L] 

Example:

Browsing to ‘http://your-domain.com’ now defaults to ‘http://www.your-domain.com’