Go Back   Windows Hosting Forums > ASP.NET Hosting > Search Engine Optimization (SEO)

Search Engine Optimization (SEO) Make your site friendly to Google, Yahoo, Inktomi, Lycos, Alta Vista...

Best Windows Dedicated Hosting

Reply
 
Thread Tools Display Modes
  #1  
Old 03-03-2008, 09:03 AM
JustPassing JustPassing is offline
Junior Member
 
Join Date: Feb 2008
Posts: 4
Default How to make 301 redirect with IIS?


How to achieve 301 redirect with IIS?

thanks
Reply With Quote
  #2  
Old 03-03-2008, 04:52 PM
Chris Chris is offline
Junior Member
 
Join Date: Feb 2008
Posts: 1
Default

Yes, 301 redirect is interesting for me too...and what is the difference between 302 and 301 redirect?

Chris
Reply With Quote
  #3  
Old 03-04-2008, 11:41 AM
HostingASPNet HostingASPNet is offline
Moderator
 
Join Date: Nov 2007
Posts: 190
Default

Hello,

301 Redirect means permanent redirect and 302 Redirect means temporary redirect.

Login in your windows server and start IIS console.
Now choose the server running the site you want to forward. Remember that you need 2 sites - one to forward from and one to forward to. These can be on the same or separate servers.
Right click on the site you want to redirect from and choose Properties - Home Directory.
The default is the first choice, "A directory located on this computer". Change it to "A redirection to a URL" and type in the new URL.
If you want it to be a 301, then be sure to check ON the choice for “A permanent redirection for this resource”. If you want it to be a 302, leave the choice checked OFF.
If you want to pass on some variables, for example, you wanted to redirect an ASP.NET site that accepted arguments for some pages and pass those same arguments on to the same pages at the new site.
In this case, in the "Redirect to:" box, enter the domain you wish to move to (no trailing slash), plus $S$Q.
By example: http://www.seconddomain.com$S$Q
Next, check the options that state the client will be sent to "The exact URL entered above", as well as "A permanent redirection for this resource" (if you want it to be a 301).
$S$Q are tags that IIS will automatically replace - $S will be replaced with the subdirectory location (such as “/modules/store.aspx”) and $Q will be replaced with the query string (such as “?id=1”).

Regards

Last edited by HostingASPNet; 03-04-2008 at 11:43 AM.
Reply With Quote
  #4  
Old 07-14-2008, 01:22 PM
andy andy is offline
Junior Member
 
Join Date: Jul 2008
Posts: 3
Default

Very useful!
Reply With Quote
  #5  
Old 08-22-2008, 06:05 PM
strivedi strivedi is offline
Junior Member
 
Join Date: Aug 2008
Posts: 1
Default

Thanks ! This is very useful.
But how about Https redirection. If your site has to be redirected; how to handle the Https redirect part ? The http can be handled as you mentioned.
Reply With Quote
  #6  
Old 08-23-2008, 08:24 AM
andy andy is offline
Junior Member
 
Join Date: Jul 2008
Posts: 3
Default

I have used https://www.seconddomain.com$S$Q and it works for me.
Reply With Quote
  #7  
Old 01-06-2010, 07:39 PM
JulietteKlonk JulietteKlonk is offline
Junior Member
 
Join Date: Dec 2009
Posts: 1
Default

Very helpful.Thanks
__________________
JCB
Reply With Quote
  #8  
Old 09-20-2010, 07:18 AM
Master Master is offline
Member
 
Join Date: Feb 2008
Posts: 128
Default

hi,

You must have IIS access to make IIS 301 redirect. What are you trying to do?

Cheers
Reply With Quote
  #9  
Old 12-28-2010, 05:28 PM
Hsm Hsm is offline
Junior Member
 
Join Date: Dec 2010
Posts: 1
Default How can we apply redirect 301 to a .htm files on IIS

Hi,
We do not have access to IIS config., its a shared server. Can we apply redirect 301 to a .htm files.

Thx, HSM

Quote:
Originally Posted by HostingASPNet View Post
Hello,

301 Redirect means permanent redirect and 302 Redirect means temporary redirect.

Login in your windows server and start IIS console.
Now choose the server running the site you want to forward. Remember that you need 2 sites - one to forward from and one to forward to. These can be on the same or separate servers.
Right click on the site you want to redirect from and choose Properties - Home Directory.
The default is the first choice, "A directory located on this computer". Change it to "A redirection to a URL" and type in the new URL.
If you want it to be a 301, then be sure to check ON the choice for “A permanent redirection for this resource”. If you want it to be a 302, leave the choice checked OFF.
If you want to pass on some variables, for example, you wanted to redirect an ASP.NET site that accepted arguments for some pages and pass those same arguments on to the same pages at the new site.
In this case, in the "Redirect to:" box, enter the domain you wish to move to (no trailing slash), plus $S$Q.
By example: http://www.seconddomain.com$S$Q
Next, check the options that state the client will be sent to "The exact URL entered above", as well as "A permanent redirection for this resource" (if you want it to be a 301).
$S$Q are tags that IIS will automatically replace - $S will be replaced with the subdirectory location (such as “/modules/store.aspx”) and $Q will be replaced with the query string (such as “?id=1”).

Regards
Reply With Quote
  #10  
Old 12-29-2010, 08:49 AM
MVP MVP is offline
Member
 
Join Date: May 2008
Posts: 352
Default

If you have IIS7 then you can use URL rewriting - http://learn.iis.net/page.aspx/460/u...ewrite-module/
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:18 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.

Best Windows Dedicated Hosting