How do I add WWW to my domain name?

Written by marina martin
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How do I add WWW to my domain name?
It's important that domains also be accessible with the WWW prefix. (WWW 88 image by chrisharvey from

A basic domain name---for example, usually all that's necessary to load a website in a web browser. However, adding the prefix "www." before the domain name has become a standard convention, and it's a good idea for every website to be accessible via both "" and "" The "www." portion of the URL is known as a sub-domain. Enabling sub-domains can be challenging for a beginner, but it's certainly not impossible.

Skill level:


    If You Can Modify Your DNS Records

  1. 1

    Log in to the DNS control panel provided by your web host.

  2. 2

    Add a new record. (This is often done by pressing an "Add Record" or "+" button.)

  3. 3

    Type "www" (without the quote marks) in the "Name" field.

  4. 4

    Type "CNAME" (without the quote marks) in the "Type" box or choose "CNAME" from the "Type" drop-down list.

  5. 5

    Type the following in the "Content" box:

    Replace "" with your specific domain name.

  6. 6

    Type "3600" (without the quote marks) in the "TTL" box.

  7. 7

    Click "Save Record."

    Apache Web Server Users

  1. 1

    Launch your preferred terminal program. On Mac OS X, this is usually Terminal (accessible via the dock); on Windows, type "cmd" (without the quote marks) into the "Run" menu off of the Start Menu.

  2. 2

    Type the following to connect to your server via the command line (also known as SSH):


    Replace "" with your specific domain name.

  3. 3

    Enter your username and password as directed.

  4. 4

    Type the following to edit your Apache configuration file:

    sudo nano /etc/apache2/apache2.conf

  5. 5

    Locate a line that looks something like this:


    (Instead of "" it should have your domain name listed.)

  6. 6

    Move the blinking prompt to the very end of the ServerName line with your keyboard's arrow keys. (Your mouse will not work in this interface.)

  7. 7

    Hit "Enter" to start a new line.

  8. 8

    Paste the following (Ctrl+V on Windows, Cmd+V on Macs) on this blank line:


    Replace "" with your specific domain name.

  9. 9

    Type Ctrl+X to quit the editing program. Hit "Enter" to confirm your saved changes. You will be brought back to the command line.

  10. 10

    Type the following to restart Apache, which is necessary to make your changes:

    sudo /etc/init.d/apache 2 reload

Tips and warnings

  • Consult your web host if you need help configuring a WWW subdomain. Certain free and low-cost hosts may not offer this option.
  • Certain methods of adding the WWW sub-domain mean search engines will interpret and as two separate sites, which can hurt search rankings. See Resources for more information.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.