Forum Moderators: open

Message Too Old, No Replies

Using http:// and http;//www

How can I redirect users that to main website using http:// only?

         

Stephen Tiller

11:00 am on Sep 26, 2006 (gmt 0)

10+ Year Member



Hi

I have a website on Windows Server 2003 and IIS 6.0.
I have a website that is in the format [#*$!#*$!x.co.uk...]
which I want to keep. But I would like to set up a format not using the www such as [#*$!#*$!.co.uk...] which automatically forwards to [#*$!#*$!x.co.uk...]

Is it possible to do this using Windows Server 2003 and IIS 6.0?

Replies would be much appreciated

Steve

mrMister

2:28 pm on Sep 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it possible to do this using Windows Server 2003 and IIS 6.0?

You need to add the appropriate A record in your DNS.

If you are using BIND then you want entries like this to your zone file:

example.com IN A 10.11.12.13
www.example.com IN A 10.11.12.13

(where 10.11.12.13 is your server's IP address)

Philosopher

2:35 pm on Sep 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not a IIS person, but wouldn't the above solution cause some serious duplicate content issues? You are basically making two different hosts point to the same content (do a search on canonical problems)

While I don't know how to do it in IIS, it would seem that the best solution should be to create a 301 redirect from the non-www version to the www version.

This method should avoid any duplicate content issues.

mrMister

3:01 pm on Sep 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



While I don't know how to do it in IIS, it would seem that the best solution should be to create a 301 redirect from the non-www version to the www version.

Yes that's correct, but at the moment he hasn't got a non-www address, so he has to get that set up first.

Once that's done he can set up the 301.

Stephen Tiller

8:53 am on Sep 27, 2006 (gmt 0)

10+ Year Member



Thanks

The replies were very helpful. However, how do I set up the 301 redirect? do I amend the .htaccess file or do it using Properties in iis?

Regards

Steve

Stephen Tiller

1:26 pm on Sep 27, 2006 (gmt 0)

10+ Year Member



Hi all

Your answers have helped me to move on. We have managed to do the A record internally, but we don't know how to do it externally. We know where to go but we don't know Linux. We need a step by step detailed instruction on how to set it in Linux.

Can anybody help us, if so, much appreciated.

Steve

defanjos

2:40 pm on Sep 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are on a Windows Server 2003, get yourself a copy of isapi_rewrite (search it). It will do exactly what you want.

IanTurner

2:59 pm on Sep 27, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



In IIS set up a second website for the non-www version with a blank default page.

Then go into properties for the site and select Home Directory properties, and change the radio button to make it a redirection to a URL

in the URL field put the http://www.example.com address and then check the make this a permanent redirect checkbox. This will make it a proper 301 redirect.

mrMister

12:54 am on Sep 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Stephen, what DNS software are you running on your Linux server?

And what do you mean by "you've done it internally"? If your master DNS server is your internal server then your backup servers should be set up to do zone transfers from the internal server.

Stephen Tiller

8:23 am on Sep 28, 2006 (gmt 0)

10+ Year Member



Hi

I fully understand how to do the the 301 redirect now. However our Server Administrator has left the company, hence our questions, but in answer to Ian's question below is the reply I received from our Support dept.

------------------------------------------------

We are using Redhat Linux 7.3

We use a "external" DNS server independent from our "internal" ones, to advertise our DNS records to the outside world. On the external DNS we current A records for domains (in the external.db file. ) e.g.

--DOMAIN:somewhere.#*$!.xx--
A:www:<live IP address>
--END--

This once the db has been rebuilt it will create new zones, so the Live address will resolve to www.somewhere.#*$!.xx. But what we want to do is resolve somewhere.#*$!.xx.

would the host A record be something like...?

--DOMAIN:somewhere.#*$!.xx--
A::<live IP address>

------------------------------------------------------

Hope this helps in understanding our plight!

Thanks

Steve

Stephen Tiller

10:10 am on Oct 3, 2006 (gmt 0)

10+ Year Member



Hi all

I am just letting everybody know that I have now resolved this and thanking everybody for their help.

Just to clear a few things up in case this forum may be of help to others. I was only using one IP address and did not have another virtual directory, website or non-www server.

my colleague had managed to add the record for [*****.co.uk...] internally only, or so he thought but MrMister checked it and it was okay externally,(i.e. outside of our firewall) which then enabled me to download the lite (which is free) version of ISAPI_Rewrite and once I had pasted the relevant code into the httpd.ini file after removing the read only restriction everything worked!

Regards

Steve

[edited by: Stephen_Tiller at 10:12 am (utc) on Oct. 3, 2006]