Focus on one domain

Why you should be focusing on one domain name for one site

Often you will find yourself buying a domain for your project (eg: example.com), however these days to secure the brand you have to buy all the associated domains (eg: example.net, example.org, example.co.uk, example.info, etc).

I then find that visitors will end up entering the sites at different points from different domains, depending on how they find it, or what they have been told.

The problem with this is its confusing, and its confusing for the user. The solution is to decide on one domain name, and focus on that, then simply redirect all traffic from the other domains to your main domain name.

This will also help enforce your brand name by ensuring the user always gets redirected to the correct domain, even if they visit the others by mistake.

In addition to this, Google states “Don’t create multiple pages, subdomains, or domains with substantially duplicate content.“, therefore by redirecting traffic to one domain, rather than having duplicates you stand more chance of your domain not being marked as “bad” by search engines. (Also see What’s a preferred domain?)

On a very similar note, another common problem is the “www.” prefix on domains, sometimes people include when visiting a URL, other times they do not. The problem with this is that “www.example.com” is considered an entirely different domain than “example.com” by search engines. By redirecting traffic that is NONE “www.example.com” we can still continue our focus and maintain our brand name.

How?

One method is using 301 redirects to redirect from other domains, to your main one.

We can do this by using mod_rewrite for Apache or ISAPI_Rewrite for IIS.

Apache mod_rewrite (.htaccess)

RewriteEngine On

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

Note: The QSA flag will append the query string to the rewritten URL.

IIS mod rewrite using ISAPI filter (mod_rewrite.ini)

RewriteCond Host: !^www\.example\.com

RewriteRule ^/(.*)$ http://www\.example\.com/$1 [I,RP]

Note: Some find ^(.*)$ works, others find ^/(.*)$ works. I’ll let you decide which to use.