Jump to content

How to make my domain address appear with "www"


adamseloisa

Recommended Posts

Hi,

 

I'm new here. Please direct me to the right thread if this is a duplicate thread, I have a new website. I am a newbie when it comes to setting up and using whmcs and control panel. I'm just starting to learn. I hope someone here can help me.

 

My website when typed on the url search won't have "www" but I have another website and my provider was webs.com when I typed the domain address even though I didn't typed "www" it will automatically have it. I'm not sure how they set it up like that since they don't have a control panel or whmcs but I want my new website like that (I don't want to use webs.com anymore as the domain name isn't transferable to other hosting)

 

Thanks in advance to those who will answer. I will really appreciate it.

Link to comment
Share on other sites

it's very easy task, you can accomplish this through .htaccess, in your WHMCS add or open .htaccess file for editing, add the following commands in it:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

 

also in "Admin Area > Setup > General Settings" make sure that "System URL" and "System SSL URL" in www. format too

Link to comment
Share on other sites

this file should be located inside WHMCS main directory http://www.example.com/whmcs/.htaccess

so create new file and name it ".htaccess" and place the following commands inside it

 

RewriteEngine On

# Redirect Non-WWW To WWW
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

# Announcements
RewriteRule ^announcements/([0-9]+)/[a-z0-9_-]+\.html$ ./announcements.php?id=$1 [L,NC]
RewriteRule ^announcements$ ./announcements.php [L,NC]

# Downloads
RewriteRule ^downloads/([0-9]+)/([^/]*)$ ./downloads.php?action=displaycat&catid=$1 [L,NC]
RewriteRule ^downloads$ ./downloads.php [L,NC]

# Knowledgebase
RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+\.html$ ./knowledgebase.php?action=displayarticle&id=$1 [L,NC]
RewriteRule ^knowledgebase/([0-9]+)/([^/]*)$ ./knowledgebase.php?action=displaycat&catid=$1 [L,NC]
RewriteRule ^knowledgebase$ ./knowledgebase.php [L,NC]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated