[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 461
  • Last Modified:

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
0
kamal_2002
Asked:
kamal_2002
1 Solution
 
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now