There are different ways to go to a website. With the favourites in your browser, with a search engine or with the address bar from your browser.
When I use the address bar I always type the domain name without www. Why? It’s easier…
Before I will make my point I will first explain the difference between a domain name with and without the www.
What is the domain name?
The next image shows you what a domain name exists of:
The domain name and extension can’t be changed. The sub domain however can be changed. When the internet was founded www was the standard sub domain. Almost every website can be reached trough that sub domain.
With or without www, choose one
Yargon.com and www.Yargon.com are two different websites, especially for the search engines. It’s wise to choose one that is going to be your standard domain name. The other one has to be redirected (with a 301) to the one you prefer.
How to redirect?
The following code has to be copied to your .htaccess file:
Redirecting www to domain without www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domainname\.com [NC]
RewriteRule ^(.*)$ http://domainname.com/$1 [L,R=301]
Redirecting without www to www:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domainname\.com [NC]
RewriteRule ^(.*)$ http://www.domainname.com/$1 [L,R=301]













Add this to your favourites

0 comments for this entry ↓
There are no comments yet for this entry.
Leave a Comment