In the early days of the Internet virtually all site URLs were preceeded by “www” — even today many casual users of the Internet will add the www to a URL, perhaps believing that this designates the “World Wide Web”.

However, most modern sites make the prefix optional. For example, both http://www.ebiz4results.com and http://ebiz4results.com are valid URLs for this site.

The main upside of this flexibility is that potential visitors will arrive at your site regardless of how they type your URL into your browser. Another advantage is that the “abbreviated” URL takes up less space in printed material and is much easier to say!

On the other hand there is a potential downside to the dual URL. This is that some search engines might consider the shorter and longer links to be different pages when indexing. This means that your search engine ranking will be lower than necessary — a definite disadvantage if you are trying to maximise your site’s traffic from “organic” search engine listings.

What you need to do…

Firstly, the absolute minimum is to make sure that both the long and short forms of your URL are operational. This is easily tested by typing each into the location bar of your browser and making sure that each takes you to your home page. If either URL results in an error, it is most unlikely that you will be able to make the required configuration change yourself. So you should immediately ask your Webmaster or ISP to correct the position.

Secondly, if your site’s search engine ranking is important — if it isn’t, you should be seriously questioning why you have a site at all! — you need to decide whether you want the short or long URL to be the standard.

The choice is generally one of personal preference. But, if your site is relatively mature you should probably Google one of your primary keyword phrases and check if the Google link to your site uses the short or long form and adopt the result as your standard.

Then ask your ISP or Webmaster to configure your server to “rewrite” the non-standard URL to the standard URL, and designate the change as permanent. Feel free to refer them to this article if the need more information!

To see what I mean, click on this link… http://ebiz4results.com and look at the address in your browser’s location bar… You’ll see that, even though you entered the short URL, your browser has taken you to the full URL, including the “www”.

HowTo force long URL’s

Forcing a long URL (ie all links to your site include the “www” in the URL) is simple with an Apache server…

  • make sure that mod_rewrite is installed
  • add the following to the site’s top level .htaccess file, replacing “domain.com” with your own domain name
  Options +FollowSymlinks
  RewriteEngine On
  RewriteCond %{http_host} ^domain.com [NC]
  RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

HowTo force short URLs

The equivalent .htaccess entry is…

  Options +FollowSymlinks
  RewriteEngine On
  RewriteCond %{http_host} ^www.domain.com [NC]
  RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

You can see this in action at http://www.nigelball.org

Notes

  1. The .htaccess file is simply a text file with the filename .htaccess, and it should be stored at the root directory of your site.
  2. Be careful when editing .htaccess — wrongly inserted commands may break your site altogether — if in doubt, seek professional assistance!
  3. If you are using a CMS such as Joomla, or blogging software, such as Wordpress, you should also check the software configuration to set the site URL to the preferred form.

Tags: , , , , , ,