Forum Moderators: open
Hope this is in the right place, couldnt find a forum on IIS.
I have a client who currently uses an ASP system on their server. Index.asp is their default homepage. The trouble is that Google is still reading index.html and awarding the HTML page with all the PR, links etc..
Previously the HTML page had been an on page javascript redirect, which to me sounded like a bad idea.
I advised the client to remove the index.html completely as the page was not required and impliment a server side 301 redirect to the .ASP page.
Trouble is im told that IIS is only capable of A server redirect at the folder level. If this is true is there any other way to 301 index.html to index.asp?
Thanks for your help
1. Browse the website you want to do the redirect for.
2. In the right pane, right click on the file you want to redirect, and click "Properties"
3. Under the "File" tab, hit the radio selection "A redirection to a URL"
4. Put the target in the "Redirect to" textarea.
5. Make sure "The exact URL entered above" and "A permanent redirection for this resource"
That should give you a 301 nicely.
Is there a way to redirect the individual pages?
There are various methods of redirecting pages. The best way is to do it at the server level. If you don't have access or cannot get your host to implement these for you, then you may have no other option. Unless of course they are old asp pages redirecting to new asp pages. Then you can use this...
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.example.com/new-page.asp"
%> If its ASP.NET, you would do this...
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.example.com/new-page.asp");
}
</script> Either one of those scripts needs to go on the old asp page above the opening
<html> tag. Always double check your work and make sure your redirects are returning the proper server headers.
Server Header Checker [searchengineworld.com]