1and1 Help Centre Categories

print article

Redirect to Another URL Using ASP.NET

Follow the instructions below to redirect your domain to another URL, forwarding any visitors that access your domain to the specified URL.

Use the script below as a reference for how to redirect the domain. The script has more than one redirect "rule" for each domain and a default action if no previous rule applied.

<script runat="server" Language="c#">
public void Page_Init(Object Src, EventArgs E){
        case "s123456789.onlinehome.us":
        case "anotherdomain.com":

Replace the text in red with your respective domains/URLs. Do not include the "www" prefix for any domain after "case." Save the script as default.aspx and upload the file to the root of your webspace.

For additional information, you may want to reference: