Best Domain SettingYou have valuable content, a grand design and a domain name. You are itching to publish your website, but are you overlooking a very important first step? Have you decided upon a domain setting and have you religiously adhered to that setting throughout your web development process and site architecture? Failure to establish a domain setting can hinder your external backlinking strategies and impact your long-term SEO strategy.

What is a domain setting?

The “www” portion of a web address, or URL, is the subdomain. The “.com” or “.edu” is known as the top level domain. The part in-between is the domain. For my site the garthobrien is the domain <>. As a website owner you must decide on your domain setting. I set all my sites in the following manner:

Are there other domain settings?

Yes, there are numerous ways to set a domain. Below are a number of examples how I could have setup my domain setting for this blog:

Notice some have the www. and some have a trailing slash (/) and some have an index.html ending. Some of the URLs include capitalization. They are all different, but they all have one thing in common; the search engines will treat each unique version above as a separate URL even though they all render the homepage of my blog.

How does my domain setting impact backlinking?

If you want increased search engine referral traffic then you must engage in accruing backlinks or external links from other websites pointing back to your website. Sometimes those links will point to an internal page or your site’s homepage. You want to make sure every possible backlink is using the same URL format. You want to control the proper way to backlink to your site as much as possible. If you do not and you start getting 50% of your links to and 50% to the search engines will start splitting your backlinks because both of those addresses will be indexed by the engines even though they are the same page.

What is the preferred domain setting and why?

I prefer and many of my colleagues prefer using this setting:

Steve Krug, usability guru, wrote a wonderful book called Don’t Make Me Think. He hammers into the reader that conventions are a good thing and trying to break a convention can be costly for your business. We all have been conditioned over the last two decades that a website is Think of every commercial you hear on the radio or see on TV. A vast majority of time you will hear Over the years brands have gotten away with, but the Users enter www. because that is how we were trained in the beginning.

If we are trained to enter www. then when another webmaster or blogger links back to your site they most likely will link to If you have your domain setting to you are missing out on all those backlinks. Backlinks that are happening because of the popular and steadfast convention of using www. before your domain name.

Finally, I always use the trailing slash (/). It is clean and it is the proper way.

How can I make search engines adopt my domain setting?

There are a few ways you can make a search engine adopt your domain setting. The first way is to create an .htaccess file that will be uploaded to your root directory. In your .htaccess file and near the very top of the code you will write the following:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domainname\.com$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

Obviously, you substitute your actual domain name for domainname above.

You also can and should create a Google Webmaster account. Once you have activated your account you will need to add your website. Add both the and versions. After you verify you are the owner of this website you can select Site Configuration on the left sidebar, and then Settings. The second option is Preferred Domain. Select Display URLs as

Google Webmaster Domain Setting

I completed those steps, but I still see backlinks to other versions of my homepage URL, help!

Some website owners are too lazy to figure out the proper link or to use the proper link when they backlink to your site. Some owners do not understand the importance of backlinking and do not realize what they are doing is not helpful for your site. So there is a solution and that is implementing the rel=”canonical” tag. Rel Canonical tells the search engines which version of a page and which URL is your preferred URL. So now the search engines will know that links to should accrue for I will go into greater detail about Rel Canonical in a later post.

Am I the cause of my domain setting chaos?

Possibly. When you link to your homepage in your own website are you always using the same URL every time? Sift through your website source code and make sure every internal link to your homepage is pointing to your preferred domain setting. So every homepage link on my site is using the URL Make sure your editors are writing links to your homepage properly and make sure your CMS is properly crafting your homepage URL. Do not get lazy on writing your domain URL.

This certainly was not an exhaustive list of reasons why it is important to properly set your domain setting, but this should have been enough information to convey the value and importance of a properly set domain setting.

10 Replies to “My Preferred Domain Setting for Your Website”

  1. Garth, thanks so much for these articles.

    Perhaps you can comment on something that entered my head as I read this. Certainly, people are indeed inclined to preface a domain name they are manually typing in the address bar with “www.”. However, it seems contrary to people’s inclination to append a ‘/’ at the end of the “.com”. It also seems to require one to think, which I suppose Krug may cringe at. The ‘/’ may be clean and proper, but that doesn’t always win out from the standpoint of intuitivity.

    Am I misinterpreting something?

  2. 0xc00000fd,

    The quick answer is Google prefers your homepage to end with a trailing slash, and since they dominate the market share for search in most of the world I will adopt their best practice. 🙂 Enter in your browser. What did you get?

    Also, part of the Google algorithm considers page load time. The more time it takes to load a page the worse that page is for SEO. A URL without a trailing slash is a malformed URL that requires the search engine crawler to “repair” a .com ending URL. The User does not see this action, but the crawler executes that process. As a website owner you do not want to add processes that a crawler must perform when visiting your site. Added processes increases the page load time. The engines want you to create a site that is as crawler friendly as possible. It takes tons of energy and money scouring, indexing and evaluating the Internet. Sites that play nice and follow their rules tend to be treated better in the SERPs.

    Another good reason is this will help reduce your tasks when migrating from an older CMS to a new CMS. A long time ago I preferred an internal webpage to end with a file type:

    However, after working with very large websites and multiple CMS platforms this can be extremely problematic. A new CMS platform can require a different file type which will force you to 301 Redirect your entire website. has millions of pages and redirecting millions of pages is a huge pain that consumes tons of resources.

    If you architect your site in the manner below and you force future CMS releases to adopt that structure then you will never need to execute the massive redirect task.

    In my experience it is very rare a new CMS will publish new URLs in the same file type as the former. It is also rare to get both the old and new to publish in the same file type in concert while you are migrating to the new system.

    However, I have had success telling the CMS developers that your URLs must be published in the manner above. So when they scatter off to make the new CMS and the new CMS starts publishing there is no need to do the massive 301 Redirect task.

    So if you are ending your internal pages with a trailing slash you should also end your homepage in a trailing slash for consistency.

    Hope that helped.

    1. Thanks for the comprehensive explanation!

      > What did you get?
      Responding to what is probably a rhetorical question, I know, but…
      It looks like browsers are “smart” (probably have been for years), and automatically append the ‘/’ if it is omitted. The request without the ‘/’ never makes its way to the web server, at least according to Fiddler. What the browser displays in the address bar is a bit more interesting, in that IE8 and FF4 both show the ‘/’, while Chrome does not (it also hides the protocol). OK, so that’s a client capability – automatically request ‘/’ when a path is omitted from the URL. That covers the “Don’t Make Me Think” part of things. 🙂

      I guess the simple piece that just wasn’t clicking was that people might actually create (or see) a link to their site without specifying a “path” (‘/’). I was stuck on the scenario where the user was going to the address bar, where it is of course unintuitive and probably unrealistic to expect them to enter the trailing ‘/’. The browsers appear to have this covered. (Which may beg the question of why a crawler can’t be as smart as a browser with respect to this element of consideration but I suppose that’s up to the crawler’s master. The browser is working to serve the user. The crawler is working to serve its master, more than the site owner.)

      I also appreciate your comments about CMS platforms, migration, page “types”, and (preferably) redirect avoidance. Good stuff to keep in mind.

  3. The crawler is smart and understands that a .com should end in a .com/. However, as a website owner you want to control every possible variable on your site to make the crawler’s visit a pleasant one.

    Do not require the crawler to execute the process of realizing a .com ending should be a .com/. You want to reduce page load time and this will help.

    Entering the .htacess rewrite code will 301 Redirect the backlinks to the .com to the .com/. Most case studies have proven a 301 Redirect will pass 90% to 99% of the link value to the redirected URL.

    Like I said it is my preference that impacts many variables from SEO practices to CMS builds and site management. Yes, I am sure the average blogger will leave out the trailing slash but I feel using the trailing slash outweighs the gain/pain of not using it.

    You can always add a sidebar module that encourages how Users should backlink to your site. Or dedicate a specific page describing how Users should backlink to your site. Include text links and image linking options.

    For a later post, but backlinking is a bear to control. You simply cannot ensure every User will backlink correctly to your site using the right link or anchor text. However, you CAN control the best SEO practices implemented on your website. I make sure the sites I am responsible for are utilizing the very best SEO practices. Then I do whatever possible to persuade how Users should link back to those sites.

    Thanks for your comments!

  4. I had been having trouble setting the preferred domain in Webmasters until I read this post. I had the www version in my account. but every time I tried to set that as the preference it would tell me I had to verify ownership of the non-www domain. It never occurred to me to add the non-www version to the account, then verify that, before setting the preference. So, duh, and thanks!

  5. Hi Garth,

    Thank you very much for this article It’s very useful!

    I have three questions for you (exscuse my poor english…):

    1) How can I verify the two versions?
    I’ve created the two profiles (www and no-www) in Google Webmaster Tools and now I have to verify them. What method do I have to use? I can verify the first domain with an html file. But the second? Am I missing something?

    2) In my htaccess I have a row that redirect every request (except images, external js/css, etc) to my main php script. Where do I put the redirec to www? I did that:

    RewriteCond %{HTTP_HOST} ^domainname\.com$ [NC]
    RewriteRule ^(.*)$$1 [R=301,L]

    RewriteRule !(\.(min|js|ico|gif|xml|fla|txt|ini|pdf|flv|swf|jpg|png|css|rar|zip|jpeg|mpeg|avi|mov|wav|mp3|tiff))$ mymainscript.php

    Am I right?

    3) I always use the meta tag “base” in my head section: . So I’m referring to the home page with anchors like: Home Page. Is it right???

    Thank you for your help!

    1. Marco,

      1. Google will require you upload one verification file for both the and Once uploaded then go into both accounts in Google Webmaster Tools and click verify.

      2. I never get too fancy with my preferred domain setting rewrite. This is how I write mine:

      RewriteEngine On
      RewriteCond %{HTTP_HOST} !^(.*)\.garthobrien\.com$ [NC]
      RewriteRule ^(.*)$$1 [R=301,L]

      3. Ditch the Meta Tag base. The only Meta Tags you need are Title Tag, Meta Description Tag, Meta Robots, and possibly Meta Keyword Tag if your internal site search relies on that tag.

  6. Sweet blog! I found it while browsing on Yahoo News. Do you have any tips on how
    to get listed in Yahoo News? I’ve been trying for a while but I never seem to get
    there! Cheers

Comments are closed.