How to Set Up Meta Page Redirects with Just HTML

If you need to arrange a redirect to a distinct web site, you don’t want to arrange any routing guidelines on an online server or mess about with JavaScript; HTML has redirect instruments in-built utilizing meta tags. We’ll talk about how and when to use them.

You Don’t Need JavaScript, or Fancy Routing Rules

Of course, in case you have the flexibility to arrange one thing higher, it is best to take it. If you will have full entry to the online server your web site is operating on, it is best to most likely arrange a 301 or 302 redirect, or if the useful resource is on the identical server, arrange a URL rewrite in order that the person isn’t affected in any respect. Even shared internet hosting with Apache can deal with 301 redirects with .htaccess configuration files.

However, the actual world isn’t all the time as fairly, and typically you simply want to deploy an HTML web page that redirects each person some other place. Usually, that is most helpful in instances the place you can’t use a correct .htaccess file, akin to with sure content material administration programs that overwrite it.

This remains to be not a fantastic answer—it’s not nice for search engine marketing, because it’s a client-side redirect, and this sort of redirect will present a white display screen on the person finish whereas ready for the redirect to kick in. If you continue to need to set one up although, HTML has some instruments constructed into it.

Using HTML meta refresh redirects, you may ship a person to a brand new web page. Create an HTML file with nothing however the next, changing with your URL:

<meta http-equiv="refresh" content material="0; URL=" />

The zero earlier than it signifies that this redirect will occur immediately, which might be excellent. However, in order for you to as a substitute show the annoying “click here if you’re not redirected in five seconds message,” you are able to do that as properly, including a second hyperlink that customers :

    <meta http-equiv="refresh" content material="5; URL=" />
    <p>If you aren't redirected in 5 seconds, <a href="">click right here</a>.</p>

However, HTTP meta refresh redirects are supported in every single browser, so it’s nearly all the time higher to simply redirect customers immediately.

Source link

This Web site is affiliated with Amazon associates, Clickbank, JVZoo, Sovrn //Commerce, Warrior Plus etc.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *