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
kamal_2002Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SemmetjuCommented:
Create a subdomain www.domain.com that links to the same as the main domain.
0
kamal_2002Author Commented:
can you please explain it more
0
SemmetjuCommented:
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
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

SemmetjuCommented:
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

0
Amandeep Singh BhullarCommented:
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
0
kamal_2002Author Commented:
i solved this by downloading url rewrite from www.iis.net
and installing it on my server and now all non www are redirect to a www
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Miscellaneous

From novice to tech pro — start learning today.