Help > Forum > Domain Name > How can I use a "naked" domain (a domain without the 'www' prefix) with my forum?

How can I use a "naked" domain (a domain without the 'www' prefix) with my forum?

To set this up, you'll do two things:

  1. Create a 301 redirect with your existing hosting provider, redirecting 'yourdomain.com' to 'www.yourdomain.com'.
  2. Configure your custom domain in Website Toolbox to be 'www.yourdomain.com'.

That's it!  Now visitors will be redirected from 'yourdomain.com' to your forum at 'www.yourdomain.com'.


Why can't I just directly use 'yourdomain.com' without the redirect?

This is a common question, and unfortunately the full answer requires a bit of explanation.

First, we insist you create a CNAME record for your custom domain that points to custom.websitetoolbox.com instead of an A record that points to a particular server's IP address.  The reason we do this is that we intend on continually upgrading our infrastructure, adding servers in multiple distributed locations to serve up pages faster world-wide, and if you pointed your custom domain at one particular IP address, your pages would break as we add servers.  That would be bad.

Now, there are apparently some mail servers out there that don't properly handle a mix of CNAME and MX records for the same name.  The MX record is how mail servers know where to deliver your mail.  So if you happened to setup something like the following:

yourdomain.com CNAME custom.websitetoolbox.com
yourdomain.com MX mail.yourdomain.com

some mail servers would look at this, and use the CNAME instead of the MX, resulting in them attempting to deliver mail to custom.websitetoolbox.com, and ultimately in you not receiving your email.  That would also be bad.  Even worse, we've encountered some DNS servers that won't resolve this properly at all, resulting in some (but not all) visitors not being able to reach your pages.


How do I set up the redirect from my "naked" domain to "www.mydomain.com"?

There are a number ways of accomplishing this, here are just a few:

  • Your best bet is to find a "Redirects" or "Forwarding" section in your host/DNS control panel and configure it there. You might also try emailing your Host/DNS support team with the request. We have specific instructions available if you host your domain name with GoDaddy or Google Domains.
     
  • If your host allows it (this won't work on Windows-based hosting), you can also use an .htaccess file. You can create this file with any plaintext editor, and then place the file in root of yourdomain.com. It should look something like this:
    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] 
  • There is also a great service called WWWizer which will handle the redirect for you. All you need to do is create an A Record that points to their IP address and they'll 301 your naked domain traffic over to your www'd domain. Website Toolbox can't officially vouch for the service, but we've used them a few times and it works great!


If you still need help, please contact us.