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 An example of how to create your own simple web browsers with ease. This guide will start you...
  2. Google Chrome Portable Browser A decent way to test for newer versions of the Chrome browser is to run the Google Chrome...
  3. How to open mobile websites on your PC browser There are a number of use-cases for which you would want to browse a mobile-optimized website on your...
  4. Auditing a Website in 60 Seconds You might be surprised by just how much information you can learn regarding the quality of a websites...
  5. Google notebooks live and rocking Google notebooks is live. The scribble pad lets you organize your browsing information all in a simple catalogue...
  6. Add a Blogger Beta blog to Qumana and Performancing Fox I find that desktop and online blog editors and publishers like Qumana and Performancing Fox are unable to...
  7. How-To: Create a WordPress Theme in 5 minutes Hi, how many of you have felt the need to create a new wordpress template/theme and felt that...
  8. Two Minute Web Browser in Java Hi! people, i have been hearing that a web browser in VB.NET takes 6 lines of code. How...
  9. Blogger upgrades itself Blogger a very popular blogging platform by google, has got its much awaited upgrade. Like all google products...

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

Get Adobe Flash playerPlugin by wpburn.com wordpress themes