How to add the "www"'s

SeanAustin

Power Member
Joined
Mar 4, 2013
Messages
781
Reaction score
736
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.
 
I believe it is fairly easy to do in wordpress. Settings > General then change the website url.
 
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>
 
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
 
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.
 
Back
Top