1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to make auto redirect?

Discussion in 'HTML & Website Design' started by owenbick, Jan 26, 2014.

  1. #1
    How do I make an HTML auto page redirect? Thanks :D
    owenbick, Jan 26, 2014 IP
  2. competent123

    competent123 Notable Member

    Likes Received:
    Best Answers:
    Trophy Points:
    competent123, Jan 26, 2014 IP
  3. Matthew Sayle

    Matthew Sayle Prominent Member

    Likes Received:
    Best Answers:
    Trophy Points:
    Great question! You can use <metahttp-equiv="refresh"content="0; url=http://example.com/"/>

    Or, certain hosts allow you to set up an auto redirect right from you cpanel. Who is your host?
    Matthew Sayle, Jan 26, 2014 IP
  4. creativewebmaster

    creativewebmaster Active Member

    Likes Received:
    Best Answers:
    Trophy Points:
    use .htaccess.
    creativewebmaster, Jan 27, 2014 IP
  5. ttttchess

    ttttchess Active Member

    Likes Received:
    Best Answers:
    Trophy Points:
    How to Do a 302 Redirect

    302 redirects (temporary redirects) are not often used because in most cases a 301 redirect (permanent redirect) is a better choice. So, what is the advantage of a 302 temporary redirect? A 302 redirect will not permanently pass the reputation and credibility of the original URL to the new URL. As a result, when you remove the 302 redirect the original URL will have a significantly better chance of regaining its previous ranking glory (whatever that may be).

    Here are some reasons why a 302 redirect would be used:

    A website is having technical difficulties so they 302 redirect the main URL (i.e. www.example.com) to a backup website (www3.example.com) while they work on the existing site.
    In rare situations a business may choose to use a shorter URL such as example.com as their branded home page URL and then 302 redirect visitors to the more complicated database-driven URL alphabet.example.com/home.php?pid=home. The benefit is, if Google allows this, the business can show the XYZ.com in search results because it will not pass the link credibility it is building to the redirected URL and the URL looks a heck of a lot better in search results than the complicated version.
    IMPORTANT: This is not a recommended tactic but there are rare occasions where a content management system (CMS) will force this issue; especially in some Fortune 500 environments where technical flexibility is a foreign concept. Also note we are not even sure this tactic works any more!

    IMPORTANT: Redirects are a critical step in ensuring your website is search engine friendly. That said, there are over 120 elements that also contribute to maximum search engine friendliness. These elements are discovered by conducting an effective SEO Website Audit.

    How to Temporarily Redirect One Page to Another Page

    If you are not familiar with managing a website from a technical standpoint you should simply tell your webmaster to create the redirect. Just tell him/her the old address and where the new address is and they will take care of it for you.
    If you are going to handle this on your own please pick the type of server your website is operating on below and proceed with the appropriate instructions.

    – Websites on Unix/Apache Servers

    FTP into your website and in the root folder, download, and then create a copy of the .htaccess file and save it in a backup folder so you can restore from a file you know works if you make a mistake.
    Note: If you cannot find your .htaccess in your FTP file list see this tutorial and if it does not help please contact your server administrator for help.
    Open the .htaccess in a program such as Notepad++ (a free program) then prepare to type on a new line at the bottom of the existing code.
    Put in the redirect based on the following example (pay close attention to the spacing between the words)redirect 302 /OldPage.html http://example.com/NewPage.html
    Save and Upload the file to your server and test the redirect by going to the old URL (i.e.www.example.com/OldPage.html) and seeing if you are sent to the NewPage.html.
    I also suggest being 100% certain a 301 redirect is being provided by using our free Server Header Checker Tool where you can copy and paste in the old address and to see for certain it is working properly.

    – Websites on Windows Servers

    If you are using a Windows server I am sorry to say this redirect is rather painful because a page has to exist at the old location in order to redirect visitors to the new location. In addition, there are two ways to create a redirect based on the Windows codebase utilized:

    Step 1) Place a page at the position of the old web page address (http://example.com/OldPage.asp)

    Step 2) There are now two options for code to be placed:

    If you are running a standard ASP website then place the following code above the <html> tag or<!DOCTYPE>:

    <%@ Language=VBScript %>
    Response.Status=”302 Found”
    Response.AddHeader “Location”,”http://example.com/NewPage.asp”

    If you are running an ASP.Net website, then place the following code above the <html> tag or<!DOCTYPE>:

    <script runat=”server”>
    private void Page_Load(object sender, System.EventArgs e)
    Response.Status = “302 Found”;

    Step 3) Upload the new page and then test it by visiting the old URL and making sure you are redirected properly.
    ttttchess, Jan 27, 2014 IP
    nhc1987, colincurt and competent123 like this.