How to automatically redirect a browser

Have you changed your server or shifted your domain and are losing out your traffic. Here is all you have to do to redirect people from your previous site to the new one. Let us assume you want to redirect http://bothack.blogspot.com to http://bothack.wordpress.com/ Here is how redirection works:

1) You add a special line of HTML code into the header of your html file, so that it looks like this (longer lines may wrap in your browser window, though they are actually on a single line):

In the above code, you’d change ‘N’ to some other number to delay the redirect. If you changed it to 5, the redirect would be delayed for 5 seconds. The URL is up to you, of course. The above example redirects to another site entirely, while it could just redirect to ANY other URL, such as another page on the same site, or a different webserver/port on the same server. It is also a good idea to add some text to your redirecting page, such as “You will automatically be redirected to the new site in xx seconds,” so the user knows what is happening. Also, you should add a link to the new site in the text, in case the user has some antiquated browser that doesn’t support redirection. You have probably seen this on other sites. Your complete html file which redirects users to your new page will end up looking something like this. If say the site is http://bothack.blogspot.com, then anyone accessing it would automatically end up at http://bothack.wordpress.com instead.

2) But if you are like me, and dont want any delay between the redirection, you could relent to scripting your site. Just add it’s code along with the meta code.

4) So a complete example :

Click HERE to see an example of it.

Related posts:

  1. Make your own web browser
  2. Integrate flash in blogger
  3. Function Corruption
  4. Google Chrome Portable Browser
  5. How to open mobile websites on your PC browser

10 Responses to “How to automatically redirect a browser”

  1. Coffee 28. Feb, 2006 at 12:16 pm #

    Hmm not too spectacular this time :p … *waits for more DIY stuff*

  2. bothack 28. Feb, 2006 at 12:49 pm #

    Coffee, will post DIY very soon…

  3. Coffee 01. Mar, 2006 at 4:28 pm #

    Preach on, my friend, preach on! :D

  4. Meg 20. Jun, 2006 at 5:34 pm #

    Well, I found it very useful.

  5. Vasya 29. Mar, 2007 at 10:11 pm #

    preved ot slesarya Vasi

  6. Dymqjkok 17. Sep, 2007 at 12:05 am #

    big sausage pizza porn
    big sausage pizza porn

  7. Kusoixox 06. Oct, 2007 at 4:26 am #

    bigsausagepizza movie
    bigsausagepizza movie

  8. Pefijxox 19. Oct, 2007 at 3:29 am #

    dr stillmans quick weight loss diet
    dr stillmans quick weight loss diet

  9. SqvOAggg 07. Nov, 2007 at 4:34 am #

    costa rica rental cars
    costa rica rental cars

  10. ATOzTOA 07. Feb, 2008 at 8:03 am #

    I can’t put META tags or Javascript on my Wordpress blog.

    Any other way?

Leave a Reply