HomeEducationHTML Redirects: What They Are & The way to Set One Up...

HTML Redirects: What They Are & The way to Set One Up Get hold of US

What Is An HTML Redirect?

An HTML redirect, often known as a meta redirect or a meta refresh redirect, tells the customer’s internet browser to ship customers from one webpage to a different.

HTML redirects can both be immediate or delayed.

Instantaneous redirects occur instantly. Delayed redirects occur after a particular variety of seconds (set by the web site proprietor).

Right here’s the way it works:

  1. A person lands on a webpage with a meta redirect
  2. The redirect is triggered in one among two methods:
    1. If the redirect is immediate, the person is shipped to the brand new web page as quickly because the HTML of the present web page hundreds
    2. If the redirect is delayed, the person is shipped to the brand new web page after the HTML hundreds and the set period of time has handed 
  3. The redirect happens, and the person is now on the brand new web page and might proceed their journey

Why Use an HTML Redirect

HTML redirects might be handy to implement since they’re set inside the HTML of a webpage. You don’t want entry to server information—just like the .htaccess file—to implement one.

They are often helpful once you’re doing upkeep on a web page and must redirect customers to a brief web page. Or once you now not need to use a web page and must ship customers elsewhere completely.

Different varieties of redirects—like server-side redirects—could require you to entry your server information. Which might be difficult (though plugins usually make this a lot simpler).

Though HTML redirects might be handy, there are a couple of causes to keep away from them:

  1. They won’t work correctly on older browsers and result in a poor person expertise
  2. Because the HTML of the previous web page must load earlier than the redirect happens, they are often sluggish and irritating to customers
  3. They don’t go alongside as a lot hyperlink fairness (from the unique web page) as different varieties of redirects which might have an effect on your website positioning
  4. Delayed HTML redirects can current accessibility points for individuals with display screen readers or people who find themselves unable to learn textual content rapidly
  5. Because you want the HTML of the primary web page, you’ll be able to’t completely delete any of the pages you need to redirect and should preserve them up and operating. This isn’t best if you wish to reorganize your web site’s construction.

The way to Redirect a Web page to One other Web page in HTML

So as to add a redirection in your HTML, paste the under code into the <head> part of the web page you need to redirect (and substitute the URL worth):

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

On this code:

  • http-equiv=“refresh” tells the browser to redirect the web page
  • content material=“3; tells the browser what number of seconds to attend earlier than refreshing the web page. On this instance, it’s three seconds. To make it an immediate redirect, set it to “0.”
  • URL=“URL= tells the browser which URL to ship customers to

Simply be sure to’re cautious when selecting between an immediate and a delayed redirect. Google interprets instant redirects as permanent (that means you don’t plan to make use of the redirected web page once more) and delayed redirects as short-term.

HTML Redirect Finest Practices and Examples

1. Keep away from Redirecting to Redirected Pages

Redirecting to a web page that already has a redirect is named a redirect chain.

Think about you land on a web site, and shortly after getting there, it redirects you to a brand new web page. After which that web page redirects you to a brand new web page …

Sounds irritating, proper?

an image illustrating a redirect chain

Not solely is that this annoying for customers, it’s additionally dangerous on your website positioning.

You’ll be able to simply keep away from redirect chains—and preserve customers blissful—by sending visitors to pages that don’t have any redirects configured.

2. Redirect to a Related Web page

When doable, ship customers to a related web page to lower the possibility of them leaving your web site altogether. 

Customers land in your web page as a result of they’ve a necessity.

Possibly they need to be taught extra about your online business, contact you, or make a purchase order.

Attempt to decide that want and redirect customers to an identical web page.

For instance, let’s say you promote footwear and have a product web page for purple sneakers. Sooner or later, you promote out of purple sneakers and must direct visitors elsewhere briefly.

Which product web page makes extra sense: one other sneaker web page or a web page for high-heels? In all probability the sneaker web page.

By sending visitors to a related web page, you’re assembly customers the place they’re to allow them to proceed their journey.

3. Inform Customers Why You’re Redirecting Them 

Once you set a redirect in HTML, your HTML must load earlier than the redirect happens.

Even if you happen to set an immediate redirect, in case your person’s web is sluggish, they might nonetheless see a portion of the preliminary web page earlier than they’re redirected.

As a substitute of exhibiting them a clean web page, add a blurb so that they know why you’re redirecting them.

Simply make certain the copy you embrace on the web page is brief and straightforward to learn. Goal for 20 phrases or fewer. This manner, customers can rapidly learn concerning the redirection earlier than it occurs.

Older browsers could not help HTML redirects, which implies if somebody lands in your web page, they received’t get redirected to the brand new one.

Whether or not your redirect is delayed or immediate, embrace a hyperlink to the brand new web page so customers can click on onward if the redirect doesn’t work.

This manner, you don’t want to fret about shedding any visitors and might guarantee guests find yourself on the proper spot.

an image illustrating "This page no longer exists" page with redirect

5. Guarantee Delayed Redirects Are Timed Correctly

Make sure that your redirects aren’t too lengthy or too brief. 5 seconds is often ample.

If a delayed redirect takes too lengthy, you threat customers bouncing—and people customers could by no means find yourself in your web site once more.

And if customers must learn a message, however the redirect is simply too brief, they could really feel simply as pissed off.

Check your delayed redirect to verify it’s not too lengthy—or brief.

Higher Alternate options to HTML Redirects

301 and 302 redirects are quicker than HTML redirects, are much less prone to damage your website positioning, and have much less influence on the person expertise in your web site. 

Right here’s when to make use of every one:

301 Redirects

301 redirects are everlasting redirects that inform search engines like google and yahoo you’ve moved content material to a brand new URL.

Use these once you:

  • Wish to direct customers from HTTP to HTTPS
  • Merge two pages collectively 
  • Delete a web page and substitute it with one thing else
an image illustrating a deleted page with 301 redirect to a new page

With a 301 redirect, you’re telling search engines like google and yahoo the previous web page now not exists. 

This manner, you go on a lot of the hyperlink fairness from the previous web page to the brand new web page. And search engines like google and yahoo know to replace the previous hyperlink with the brand new one within the search outcomes.

302 Redirects

302 redirects are short-term redirects. 

They’re helpful if you’ll want to redirect customers for a sure time period. Like when you’ll want to carry out web page updates or need to run an A/B take a look at. 

For instance, you’ll be able to implement a 302 redirect for a touchdown web page to check which call-to-action copy leads to extra conversions.

an image illustrating a 302 temporary redirect

Nonetheless, as a result of 302 redirects are solely short-term, search engines like google and yahoo could not replace the search outcomes with the brand new hyperlink.

This implies you’ll want to preserve monitor of your 302 redirects and take away them once you now not want them.

The way to Audit Your Redirects

In case your web site has redirects, you’ll desire a fuss-free technique to audit them and ensure they’re working as supposed.

You’ll be able to preserve a spreadsheet, however spreadsheets might be tedious to handle.

Plus, if you happen to overlook so as to add a redirect to your sheet, you would possibly overlook about it (and overlook to take away it if wanted).

A better method is to make use of Semrush’s Website Audit instrument.

To begin, go to “Website Audit” and arrange a brand new venture or click on on the present venture you’d prefer to establish the redirects for.

Semrush’s Site Audit tool

Then, click on the quantity beside “Redirects.”

an arrow pointing to the number beside “Redirects” showing 339

Right here, you’ll see a listing of the redirects in your web site, the place you may make certain every web page has the fitting sort of redirect.

a list of the redirects on your site in Site Audit tool

This report additionally helps you see redirect chains.

Right here’s how.

Below “Points” seek for “redirect chain.”

search for “redirect chain”

Click on on “# redirect chains and loops.”

“102 redirect chains and loops” button highlighted

Use this report back to establish—after which repair—pages with a number of redirects to offer customers a greater expertise in your web site.

"Page URL with redirect link" section highlighted in the report

Utilizing Semrush’s Website Audit instrument, you might be assured that customers all the time find yourself the place they’re presupposed to, with none trouble.

#HTML #Redirects #Set

Continue to the category


Please enter your comment!
Please enter your name here

- Advertisment -spot_img

Most Popular

Recent Comments