Permanent Redirect on Windows Server

Discussion in 'Hosting Services / Control Panel' started by wisemx, Mar 2, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. We might not be talking about the same thing but...

    The sites I have hosted with DASP all worked with and without the www.

    Currently on a site I have hosted with DASP I've got a DLL that removes the www automatically.
    No IIS setting is required for that, simply a ASP.NET 2.0 /bin/ application, with no code other than the web.config

    On that same site I trap all incoming requests and redirect them to the proper domain.

    In another section of that site all URLs are trapped and kept within that application, via ASP.NET 2.0 settings.
     
  2. Hi everyone

    I am looking for .net hosting, but wondered what your policy is with regards to setting up a permanent redirect for the domain without the www to the domain with the www?
    For example samarketing.co.za permanent redirect to www.samarketing.co.za
    For SEO reasons this is a requirement, I am sure I do not have to expand on this.

    Thanks, Roelof
     
  3. Hi wisemx

    Thanks for your responses. I think the issue for us are different. If you use any kind of coding to accomplish a redirect it means that you are doing an 'ilegal' redirect in the view of the Search Engines. Without a redirect both sites ( Seen as different sites) are live meaning that it is duplicate sites 'fooling' the search engines. There are other reasons too but this is the one I want to address atm. I have had several customers loose their rankings due to this specific problem and it is a common topic on most SEO forums and even the Matt Cutts blog. In PHP the redirect used would be a 301. On a MS server the only redirect that can be used is a permanent redirect setup in IIS. This essentially means that a 2nd site must be setup for the domain without the www. This site then needs to be permanent redirected to the domain with the www. If you do a tracert on the two domains you will immidiately see the difference between the two forms of redirect. Only setting up the site with the www and not the other one. Is equaly bad as many users go to a website without using the www. I have 4 dedicated servers at the moment and in the region of 1,000 domains of which just over 300 are live sites. I am looking for shared hosting services that provide this facility and so far such a simple process seems to be a complication with shared hosting on a MS box. I was told that DASP deliver a great service and came here by referral from onne of my forum members, to ask this deciding question.
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    ChatMaster,

    1) When you said it is 'illegal' to redirect programatically, it is invalid because with ASP.NET and ASP, you can actually write the HTTP response code to 301 (which is exactly the same as the IIS redirect). There are many articles you can find on Google regarding how to do this. Example

    http://www.webconfs.com/how-to-redirect-a-webpage.php

    2) We've been discussing the ramification on SEO with both www.domain.com and domain.com. Personally, I think this is no longer enforced by Google. Our site discountasp.net works w/ both www. and non-www and we do not see Google or other places penalizing us.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  5. To do that in code is no problem, many of us already do that here via ASP.NET 2.0 and Classic ASP.


    You can addor remove the www when the site is accessed.
    You can also rewrite the entire URL if you want.
     
  6. Mmmmmmm, you are missing the point.

    You cannot do that in code because that will definitely cause issues with search engines. The ONLY way to do it is in IIS, setting up a permanent redirect from there.
     
  7. Hi Bruce

    Thanks for your response. That article will be most usefull.
    What will your suggestion be to redirect the no www to the www domain. The article is helpfull if you redirect individual pages but the way the domains are setup in a share hosting environment both the www and without are setup in IIS to display the same site. I couldn't find anything in the article that helps with that. Or am I missing something here? Is there perhaps a way to check the address and then make it redirect?
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page