Link to home
Start Free TrialLog in
Avatar of kamal_2002
kamal_2002

asked on

adding www to the url

hi
always my domain shows like this
http://domain.com
but i want it to be like this
http://www.domain.com

my website is asp.net hosting on windows server 2008 with iis7
Avatar of Semmetju
Semmetju

Create a subdomain www.domain.com that links to the same as the main domain.
Avatar of kamal_2002

ASKER

can you please explain it more
I assume that you are hiring your domain from some provider, right?
If so, go to their site, login, and search for "subdomains" in a control panel of some sort.
Then add the subdomain www.domain.com and make that link to the same ip/port as http://domain.com
Ah, I think i am mistaken... you can acces http://www.domain.com/ right? But you want  http://domain.com to be http://www.domain.com, if so:

Options -Indexes +FollowSymLinks

place this .htacces file in your root directory:

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

Open in new window

Avatar of Amandeep Singh Bhullar
Hi

You need to rewrite url from non www to www.
Please check article
http://track.nextmill.net/KB/a85/rewriting-non-www-to-www-url-iis7-servers-only.aspx

This explain how to achieve this in IIS 7 using .NET

Hope this will help you
ASKER CERTIFIED SOLUTION
Avatar of kamal_2002
kamal_2002

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial