301 redirect for a single domain in windows server

shrishti132 used Ask the Experts™
I want to redirect http://mydomain.com to http://www.mydomain.com by adding a 301 redirect on my windows server. How to do this? I am using Helm control panel. What is the best way to setup this?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
if you use php make a file index.php on the http://mydomain.com 

Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.mydomain.com" );

IIS Redirect

    * In internet services manager, right click on the file or folder you wish to redirect
    * Select the radio titled "a redirection to a URL".
    * Enter the redirection page
    * Check "The exact url entered above" and the "A permanent redirection for this resource"
    * Click on 'Apply'


Thanks for the reply.
I want the www redirect for my domain hosted in WINDOWS server.
I don't have direct access to the server.
read this http://www.somacon.com/p145.php

with meta and javascript you can do a redirect but not 301
and it's not seo frendly

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial