NameSilo

Redirect index.asp to / with IIS

Spacemail by SpaceshipSpacemail by Spaceship
Watch

CHEECHDIAZ

Established Member
Impact
0
I'm looking to hire someone who knows how to do a se friendly 301 redirect from my index.asp file to /.

It appears as if Google sees these pages as two.

I'm willing to pay to have someone do it. Please note that it is a windows server and not as easy to do as other types.

Please reply with your quoted price and how you plan to do it. Thanks
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Do you have admin rightson the server?

Does it have the IIS equivalent module for mod_rewrite installed?

If you do not you will need to create a conditional statement within index.asp to check if index.asp is within the path the user is veiwing. If it is then do a redirect using something like what is in the following page http://www.seoconsultants.com/tips/asp/301.asp
 
0
•••
just follow the instructions it will save you some money.

Take the old-page.asp that is being renamed or moved and remove all of the code. Place the below code in place of the old HTML/XHMTL.

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "/new-page.asp"
%>

In the above 301 redirect example, you need to change the Location to the URI of your new-page.asp. Include the full URI path unless you are redirecting to a root level page (index.asp, default.asp, etc.). If you are setting up a 301 redirect for a root level page, keep the URI short and without the index.asp file name. For example...

"Location", "/sub-directory/"

Once you've included the above code at the top of your old-page.asp, verify that it is returning the proper server header response using our Check Server Headers tool. You should see a recursive response (2 server responses) returned from the server header that look similar to this...

#1 Server Response: /old-page.asp
HTTP Status Code: HTTP/1.1 301 Moved Permanently
Server: Microsoft-IIS/5.0
Date: Fri, 04 Jun 2004 03:11:15 GMT
Location: /new-page.asp
Connection: Keep-Alive
Content-Length: 0
Content-Type: text/html
Cache-control: private

Redirect Target: /new-page.asp

#2 Server Response: /new-page.asp
HTTP Status Code: HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Fri, 04 Jun 2004 03:11:15 GMT
Connection: Keep-Alive
Content-Length: 14268
Content-Type: text/html
Cache-control: private

The first server response above is telling you that the referenced URI (old-page.asp) has been Moved Permanently. This is evident due to the HTTP Status Code of 301. The Moved Permanently is referred to as a Reason Phrase. The Reason Phrase can be any value although the official term for Status Code 301 is Moved Permanently. Other unofficial 301 Reason Phrases may be; Error or Permanently Moved.

The second server response is telling you that the Redirect Target (Location) is OK. This is how it should be when permanently redirecting an old-page.asp to a new-page.asp. The OK is the official Reason Phrase for Status Code 200.

In reference to spidering entities (crawlers, robots, spiders), the ASP code above and the ASP.NET code below will send a server header response of 301 Moved Permanently and, is instructing the spiders to update their index and replace the old URI (old-page.asp) with the new URI (new-page.asp). This could take several months before results are final.
ASP.NET Version

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","/new-page.asp");
}
</script>

Note: If your 301 is set up properly, you should not be able to browse to the old-page.asp (unless you have auto redirects turned off in your browser). The browser will automatically redirect you to the new-page.asp. This is of course the intended behavior.

To be on the safe side, you could always leave your old-page.asp in place and include something like this to alert visitors (who have auto redirects turned off) that the page has been moved and to update their link references...

The resource you've requested /old-page.asp has been moved to a new location as of 2004-12-01. Please update your bookmarks and/or links to reflect the new location of this resource.

New URI Reference: /new-page.asp

This old page will be removed on 2005-02-01 at which time we will assume our visitors have updated their links and the spidering entities have updated their indexes. At that time, this old page will return a 404 Not Found status. Thank you in advance for your understanding and continued support.

Edward Lewis, System Admin

Remember to insert your 301 Moved Permanently code above all other code on the page. For those who have auto redirects turned off, they will see your message above along with the new URI reference. Everyone else will be automatically redirected to the new URI reference.

Peter said:
 
0
•••
The above seems to cause a loop since it's going from page a to page a (not a to b)

index.asp and / are the same page.

Google is seeing them as different/duplicated pages.

Do you have admin rightson the server?

Does it have the IIS equivalent module for mod_rewrite installed

I have shared hosting with GoDaddy... I'm not too technical when it comes to that stuff, that's why I rather pay to have someone who knows do it.
 
0
•••
you need to run through an if case and check to see if the url the user has used includes index.asp if so do te redirect if not continue as normal. I can do this in PHP easily but not overly familiar with asp.
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
Appraise.net

We're social

Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back