1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to add the "www"'s

Discussion in 'BlackHat Lounge' started by SeanAustin, Jun 20, 2013.

Tags:
  1. SeanAustin

    SeanAustin Power Member

    Joined:
    Mar 4, 2013
    Messages:
    740
    Likes Received:
    707
    Location:
    Rocky Mountains
    Hey Guys,

    Have got an extremely novice question here. When I type any of my domain names in the url box with the www's at the beginning and press enter, it removes the www's and then takes me to the site. I would love to keep the www's present and am curious what I need to change to do this. I am using wordpress, hostgator as my hosting, and godaddy for the registration.

    I'm sure it would take someone 20 seconds to answer this dumb dumb question.

    Cheers.
     
  2. pathart

    pathart Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    845
    Likes Received:
    653
    Location:
    Dublin - Ireland
    I believe it is fairly easy to do in wordpress. Settings > General then change the website url.
     
    • Thanks Thanks x 1
  3. hadoken

    hadoken Regular Member

    Joined:
    Dec 4, 2012
    Messages:
    300
    Likes Received:
    529
    Location:
    Toronto
    If its a Wordpress site. The easy way is to go to yoursite.com/wp-admin/options-general.php and change the address to use the www.

    Otherwise you could edit your htaccess file in root folder and add something like this
    Code:
    RewriteCond %{HTTP_HOST} !^$RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteCond %{HTTPS}s ^on(s)|
    RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    If using IIS then it could be something like
    Code:
    <rewrite>
       <rules>
            <rule name="Add www" patternSyntax="Wildcard" stopProcessing="true">
                <match url="*" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="www.PUTYOURWEBSITEHERE.com" negate="true" />
                </conditions>
                <action type="Redirect" url="http://www.PUTYOURWEBSITEHERE.com/{R:1}" />
            </rule>
        </rules>
    </rewrite>
    
     
    • Thanks Thanks x 1
  4. pavan

    pavan Elite Member

    Joined:
    Mar 30, 2008
    Messages:
    1,603
    Likes Received:
    432
    just create a sub domain under your hosting panel
    create sub domain like www and point it to root directory
    if you are using wordpress u need make necessary changes as mention in above 2 posts
     
    • Thanks Thanks x 1
  5. SeanAustin

    SeanAustin Power Member

    Joined:
    Mar 4, 2013
    Messages:
    740
    Likes Received:
    707
    Location:
    Rocky Mountains
    As mentioned above, it was as easy as going to general settings in wordpress and adding the www to the wordpress url and site url for anyone who might have the same problem in the future.

    Can't help but thanking all you guys for helping a fellow member out. Much appreciated as always.