How do I remove the www on a domain?

Discussion in 'Domain Names' started by profanitytalker, Jan 21, 2008.

  1. #1
    Hey guys, I would like to know how to remove the www on the domain. When I place a www on the front of my url it is different from when I don't put the www. Is their a way to fix this problem?
     
    profanitytalker, Jan 21, 2008 IP
  2. Dr. XYZ

    Dr. XYZ Guest

    Messages:
    226
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    With a simple mod_rewrite directive in your .htaccess file

    
    Options +FollowSymlinks
    RewriteEngine on
    RewriteCond %{http_host} ^www\.yourdomain\.com [nc]
    RewriteRule ^(.*)$ http://yourdomain.com/$1 [r=301,nc]
    
    Code (markup):
     
    Dr. XYZ, Jan 21, 2008 IP
  3. profanitytalker

    profanitytalker Well-Known Member

    Messages:
    1,487
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    150
    #3
    Thanks. :D
     
    profanitytalker, Jan 21, 2008 IP