How to Redirect a Web Page using Meta tag | IndianCreator

How to Redirect a Web Page using Meta tag | How to Redirect to Another Page using Meta tag - IndianCreator


How to Make a Page Redirect without a Script

The Redirect happens when the user enter the URL and the Browser will automatically move to a different page. Typically, Redirect is used when there is a change in the structure or page on a Blog or Website.


When learning about HyperText Transfer Protocol (HTTP), you should understand the basics about the Response Code. Here are some of the Response Code:


➦ 1xx - Response Information (Processing)
➦ 2xx - Successful Response (OK)
➦ 3xx - Response Redirect (Moved Permanently)
➦ 4xx - Response Client Error (Not Found)
➦5xx - Server Response Error (Bad Gateway)



Suppose you want to delete the web page and create a new web page. If there are users who enter the URL of the web page on the Browser, it will display a Response Code 404 (Not Found). If we use a HTML Redirect, then it will appear Responce Code 301 (Moved Permanenty) or 302 (Found). Such a code can not be seen by the user, but the Browser will understand it and will move the user to a new URL.


☞ Writing The Redirect Code

The HTML Redirect can also be called with the name of the Meta Refresh Redirect or an HTML Meta Redirect. By using the Meta Redirect, we can define a Redirect URL along with the time (the Redirect after a few seconds).

➦ To create an HTML Redirect to another page, you can use the following code sample:


<meta http-equiv="refresh" content="time; URL=url_new" />



As you can see in the example code above, there are two parameters:

☞ time - Represents the time delay before the Browser moving the user to a different page. Written with units of seconds or enter the number " 0 "  if you want to directly move the page.

☞ url_new - Represents the URL address that you want to Redirect.



☞ Here is an example of a Redirect with Delay for 5 seconds :


<meta http-equiv="refresh" content="5; URL=https://www.indiancreator.in/" />


➦ The same as the Meta Tags, the Redirect should be put at the <head>



☞ Why Should there be a Delay?

If you do not set the Delay on the Meta Redirect, it is possible the user will be confused because there is no information that the page has been moved. Therefore, we can use the Delay to notify to the user.

The other reason is that the Meta Tag Redirect that is not supported by the Browser. Just maybe this can occur if there are users who use old Browsers. In this case, we need to give the Direct Link manually. Here is an example:



<head>
<meta http-equiv="refresh" content="5; URL=https://www.indiancreator.in/" />
</head>

<body>
<p> Click <a href="https://www.indiancreator.in/">Right here</a> if the page has not been redirected
</p>
</body>


☞ Tips HTML Redirect

➦ If you do not specify a URL to Redirect. Then the HTML page will Reload automatically based on the specified time.

➦ I suggest that use them Delay more than 3 seconds.

➦ Be careful in using HTML Redirect. If you too much use them. Maybe Search Engines will consider it as Spam.