![What They Are & How to Set One Up](https://webcube360.co.uk/wp-content/uploads/2023/07/html-redirect-sm.png)
What They Are & How to Set One Up
- Digital MarketingNews
- July 30, 2023
- No Comment
- 88
[ad_1]
What Is An HTML Redirect?
An HTML redirect, often known as a meta redirect or a meta refresh redirect, tells the customer’s net browser to ship customers from one webpage to a different.
HTML redirects can both be instantaneous or delayed.
On the spot 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:
- A consumer lands on a webpage with a meta redirect
- The redirect is triggered in considered one of two methods:
- If the redirect is instantaneous, the consumer is shipped to the brand new web page as quickly because the HTML of the present web page hundreds
- If the redirect is delayed, the consumer is shipped to the brand new web page after the HTML hundreds and the set period of time has handed
- The redirect happens, and the consumer is now on the brand new web page and might proceed their journey
![an image illustrating instant vs delayed HTML redirects](https://static.semrush.com/blog/uploads/media/db/ff/dbfff7703b5f11af738b1791af17dff6/qxuEp6SbgsZQULDfr3prsWYQhskJax_DNMv_N-2sEwjDjLn_PNwSSIO1B67ka_2NEMTC69B65kQ3oFaX_3PFuSu-zQrOQc1LNcLpmKiUjSYr9ZLoaC58dF7wkgsd8zMudkN2QDHLZXzTJfU9daJqMl4.png)
Why Use an HTML Redirect
HTML redirects might be handy to implement since they’re set throughout the HTML of a webpage. You don’t want entry to server recordsdata—just like the .htaccess file—to implement one.
They are often helpful if you’re doing upkeep on a web page and must redirect customers to a brief web page. Or if you not need to use a web page and must ship customers elsewhere completely.
Different types of redirects—like server-side redirects—could require you to entry your server recordsdata. Which might be difficult (though plugins usually make this a lot simpler).
Though HTML redirects might be handy, there are just a few causes to keep away from them:
- They may not work correctly on older browsers and result in a poor consumer expertise
- For the reason that HTML of the previous web page must load earlier than the redirect happens, they are often gradual and irritating to customers
- They don’t go alongside as a lot hyperlink fairness (from the unique web page) as different kinds of redirects which may have an effect on your search engine marketing
- Delayed HTML redirects can current accessibility points for folks with display readers or people who find themselves unable to learn textual content rapidly
- Because you want the HTML of the primary web page, you possibly can’t completely delete any of the pages you need to redirect and should maintain them up and operating. This isn’t preferrred if you wish to reorganize your site’s structure.
The best 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=https://www.yoururl.com/newpage" />
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 instantaneous redirect, set it to “0.”
- URL=“URL=https://www.yoururl.com/newpage” tells the browser which URL to ship customers to
Simply be sure you’re cautious when selecting between an instantaneous 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](https://static.semrush.com/blog/uploads/media/0c/62/0c626c30a2df4d364a8f798e2acd6cc4/JD1DvZ2diR0W1D91Pxvge25RA1Xu5KABKdz2b7qbb7nidWaDl0LXub87hgoMRzWefMczlygU7bGAXc7tzYu4ZI3KuLWfPUwnMZjioezj5JhGXZ25zfdLiDUNBNeiZdpv2PLegWW_tpCSMxaBV6RSokk.png)
Not solely is that this annoying for customers, it’s additionally unhealthy on your search engine marketing.
You’ll be able to simply keep away from redirect chains—and maintain customers joyful—by sending visitors to pages that don’t have any redirects configured.
2. Redirect to a Related Web page
When potential, ship customers to a related web page to lower the prospect of them leaving your website altogether.
Customers land in your web page as a result of they’ve a necessity.
Perhaps 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 the same 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 quickly.
Which product web page makes extra sense: one other sneaker web page or a web page for high-heels? Most likely 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
While you set a redirect in HTML, your HTML must load earlier than the redirect happens.
Even in the event you set an instantaneous redirect, in case your consumer’s web is gradual, they may 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 sure the copy you embrace on the web page is brief and simple to learn. Purpose for 20 phrases or fewer. This fashion, customers can rapidly learn in regards to the redirection earlier than it occurs.
4. Embrace a Hyperlink to the New Web page
Older browsers could not help HTML redirects, which suggests 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 instantaneous, embrace a hyperlink to the brand new web page so customers can click on onward if the redirect doesn’t work.
This fashion, 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](https://static.semrush.com/blog/uploads/media/74/11/74112d61a12382ec93be7b3fb91445ea/VZ2gebfonZ7pOQChSCx3cUeW6ABofrxJO-nntKDwNkW-mdelTT1B1Os_Axclsq6nbmVH5n9Gur2weRnyiqWuDc2g3scMiXjqLzbFqWSvNC3jJhxn4eIWvi2QzRxTJZvCTUcPgYmHV3EftB1XiWdOqXk.png)
5. Guarantee Delayed Redirects Are Timed Correctly
Be sure that your redirects aren’t too lengthy or too quick. 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 website once more.
And if customers should learn a message, however the redirect is simply too quick, they could really feel simply as annoyed.
Check your delayed redirect to verify it’s not too lengthy—or quick.
Higher Options to HTML Redirects
301 and 302 redirects are sooner than HTML redirects, are much less more likely to harm your search engine marketing, and have much less influence on the consumer expertise in your website.
Right here’s when to make use of each:
301 Redirects
301 redirects are everlasting redirects that inform serps you’ve moved content material to a brand new URL.
Use these if 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](https://static.semrush.com/blog/uploads/media/68/85/688531bd477a520973cd838b0114788d/ErdmWg_Eqm0Y9rjny63FFEXVhU_mHIevbGczjoN2czSHfVOG1u3pNx1X8vfdRjigBvfXaEAmxO9pQIKQgPJvRk0gC4tkHSFWN_wWnuaX7C7r3jcC8qpK0QHZPz_FPISUB6huRPs1mFyp-JOnySYivRw.png)
With a 301 redirect, you’re telling serps the previous web page not exists.
This fashion, you go on a lot of the hyperlink fairness from the previous web page to the brand new web page. And serps 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 have to redirect customers for a sure time period. Like when you have to carry out web page updates or need to run an A/B check.
For instance, you possibly can 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](https://static.semrush.com/blog/uploads/media/18/80/18801be1f040fb3fef6b0c96fe013793/dD8KR3B72ArbLfCf2VosHniyeS3DA8Qch9wq2WdakT4DujYmVSFA96mu0g4WXI_xsQJU5-MctOTni-SkQL5ipaJOnYQxUCRzWNrRTaEyqnPW71rxGl3IfaeirZvGeYAchoGjnaModlPw3GtTh4AEDWA.png)
Nevertheless, as a result of 302 redirects are solely short-term, serps could not replace the search outcomes with the brand new hyperlink.
This implies you have to maintain observe of your 302 redirects and take away them if you not want them.
The best way to Audit Your Redirects
In case your website has redirects, you’ll need a fuss-free technique to audit them and ensure they’re working as supposed.
You’ll be able to maintain a spreadsheet, however spreadsheets might be tedious to handle.
Plus, in the event you 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 approach is to make use of Semrush’s Site Audit instrument.
To begin, go to “Website Audit” and arrange a brand new venture or click on on the present venture you’d wish to determine the redirects for.
![Semrush’s Site Audit tool](https://static.semrush.com/blog/uploads/media/07/c7/07c78b5c597f495bb6feac1a0744029e/yeCIjnt3o3r6tg0EfiCaEC_9GQd_Vm-8wdGMC3pq6hKpIoHT4ZATP57x3uYgOuxGWRUjTGnt6-YyVhYg_AGVu1p688HuGai_D5ZtGelGyH5JeBYvsQpdOYJvgqAB27g-9Pw_-h8WGyXEHFDIY8lNOX4.png)
Then, click on the quantity beside “Redirects.”
![an arrow pointing to the number beside “Redirects” showing 339](https://static.semrush.com/blog/uploads/media/68/0f/680f178423ace4da7d1287d9ded97d7e/ztECDNe1EaAU9NO9Y0YyDV-0pngLfnsinaI5JZEZqmhofcXZgKEq1yxz8kwYsp-spuzVKx-zSJ9KT1QG8oBFq_ua99b8QmQ5FdYvWFWA3JcaeKWo4DAS0gckE18iScYybVfLjAJpBomuGAnDugBTfpE.png)
Right here, you’ll see an inventory of the redirects in your website, the place you may make certain every web page has the proper sort of redirect.
![a list of the redirects on your site in Site Audit tool](https://static.semrush.com/blog/uploads/media/55/b2/55b2e9a71fde4495bbcf371a83005d3f/TSvRnwFJpqQOQhN6GrTLxR5RRenKc6x3_CnRzhjcSwh6oNQZ3BBbrbMYUM4HF4_AoH7fbfCx-0OT3yDx_geTTYX6uiHTJBK84Gld5iSeoH_Ypsf12OciM0bh3hxUoYEra7faHSlEZjS0OH4keFdapug.png)
This report additionally helps you see redirect chains.
Right here’s how.
Beneath “Points” seek for “redirect chain.”
![search for “redirect chain”](https://static.semrush.com/blog/uploads/media/fa/b4/fab47b354f37f5aa1ed1a331a304db68/Q3bVYzIhR5QcTNxIRCtUaOseFcitWqF8-2lOn4O3H2WXv_GpYsvohg3-mRz8Sk_lWfAAxOEg2xoJeC68PbOE2wd7T9mn_Q7VLuQxTSLoCx-zsu-Z_d0SQO_XqHz6D6NN0ofb3WuXnYbAC8W7d1n8k38.png)
Click on on “# redirect chains and loops.”
![“102 redirect chains and loops” button highlighted](https://static.semrush.com/blog/uploads/media/d4/14/d41403421476a1a24fee52de788cb836/BweYJXcpov1-sZKpfXtTIM5a4yOVY1nHMwAAw3ZRtxMC0c1aPjocyGkuumCIQC6lCQJcFjRW-uUw9xPppGYhBpqsh-3kcEcCUWvUvEypO3UYHbe0AyYYONskJIyY-Ex8BYTFzzBwhRbGyLtkdqXxAzY.png)
Use this report back to determine—after which repair—pages with a number of redirects to provide customers a greater expertise in your website.
!["Page URL with redirect link" section highlighted in the report](https://static.semrush.com/blog/uploads/media/36/46/3646a51322a2a12d6862bd286332c1f2/2qyNyYhCc7JkPDVub3vmU11RZB2oUAegJutiYPUcubDh0s3dPNjtLgsDMNGW2YdtvpPg_BYJEb9s2YUl7P3kw4JgGJDBIcZq2IBaQIafLlnw6IqlJA2Tbx2xmponmfHpEB0PvS33PrAMAf0Pli-OwTg.png)
Utilizing Semrush’s Website Audit instrument, you might be assured that customers at all times find yourself the place they’re speculated to, with none trouble.
[ad_2]
Source link