1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fastest Way to Redirect?

Discussion in 'HTML & JavaScript' started by chad362wiley, Jul 25, 2013.

  1. chad362wiley

    chad362wiley Supreme Member

    Joined:
    Dec 8, 2011
    Messages:
    1,341
    Likes Received:
    782
    Occupation:
    n/a
    Location:
    Behind you
    Home Page:
    Hey all,

    Right now I just use an HTML redirect to mask my link:

    Code:
    [COLOR=#800000][FONT=Consolas]<meta [/FONT][/COLOR][COLOR=#FF0000][FONT=Consolas]http-equiv[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]=[/FONT][/COLOR][COLOR=#0000FF][FONT=Consolas]"refresh"[/FONT][/COLOR][COLOR=#FF0000][FONT=Consolas]content[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]=[/FONT][/COLOR][COLOR=#0000FF][FONT=Consolas]"0; url=http://example.com/"[/FONT][/COLOR][COLOR=#800000][FONT=Consolas]>[/FONT][/COLOR]
    Are there any faster ways of doing this? Whenever I load the 1st domain there is always a delay before redirecting to the second URL.

    Thanks!

    Chad
     
  2. qrazy

    qrazy Senior Member

    Joined:
    Mar 19, 2012
    Messages:
    1,111
    Likes Received:
    1,712
    Location:
    Banana Republic
    You can also add redirects in .htaccess file which should be little faster.
     
    • Thanks Thanks x 1
  3. TheeAriGrande

    TheeAriGrande Regular Member

    Joined:
    Jul 14, 2013
    Messages:
    270
    Likes Received:
    151
    Location:
    Candlestick Park
    There are a couple other ways of redirecting.

    1. .htaccess
    2. PHP header redirect
    3. Javascript redirect

    I believe 1 or 2 would be faster than the meta redirect you are using now. I haven't ran any benchmarks so I don't have the numbers to back it up.
     
    • Thanks Thanks x 1
  4. SEOtheWorld

    SEOtheWorld Newbie

    Joined:
    Nov 7, 2011
    Messages:
    49
    Likes Received:
    14
    I always use .htaccess redirects. httpd.conf are a slight bit faster, but usually you won't have access to that file unless you have a dedicated server.
     
    • Thanks Thanks x 1
  5. ahiddenman

    ahiddenman Elite Member

    Joined:
    Dec 11, 2010
    Messages:
    2,647
    Likes Received:
    2,087
    Location:
    204.15.23.255
    I usually just do a cPanel re-direct, quick and easy.
     
    • Thanks Thanks x 1
  6. Moosey

    Moosey Senior Member

    Joined:
    Dec 5, 2011
    Messages:
    1,043
    Likes Received:
    747
    You can also wildcard, but it's permanent.
     
    • Thanks Thanks x 1
  7. todordonev

    todordonev Regular Member

    Joined:
    Nov 23, 2012
    Messages:
    379
    Likes Received:
    228
    Gender:
    Male
    Location:
    Bulgaria
    Home Page:
    Depending on your needs
    1. Link shortener
    2. Domain redirect (use dot.tk for free domains)
     
    • Thanks Thanks x 1
  8. CodingAndStuff

    CodingAndStuff Regular Member

    Joined:
    May 6, 2012
    Messages:
    236
    Likes Received:
    84
    Occupation:
    Swagstronaut
    Location:
    You can't have my bots. Sorry :'(
    The fastest way for you to redirect a user from one domain to another would be to use .htaccess. If you redirect in PHP, it has to load the PHP module, process it, and return the headers. In HTML/Javascript you have to wait for the response. With .htaccess and whatever http server you're using it will send a redir header back nearly instantly without loading all of those extra resources.
     
  9. chad362wiley

    chad362wiley Supreme Member

    Joined:
    Dec 8, 2011
    Messages:
    1,341
    Likes Received:
    782
    Occupation:
    n/a
    Location:
    Behind you
    Home Page:
    Ended up going with .htaccess, very fast. Thanks guys.
     
  10. makinsales

    makinsales Regular Member

    Joined:
    Jul 23, 2011
    Messages:
    368
    Likes Received:
    283
    Location:
    The Murda Mitten
    Sup chad,
    I also use php redirect. Since noone put the code, here it is.


    Code:
    <?php
    
    header('Location: http://blackhatworld.com');
    
    ?>
    then you just save as a .php file.
    like.. yourwebsite.com/blackhatworld.php

    I also like the pretty link plugin for wordpress. http://wordpress.org/plugins/pretty-link/