How To Make An URL Redirection Using HTML

URL Redirection is used for websites or pages that have moved domains. While automatic redirecting could sound good, it is not always the best option: your customer could suspect fraud, if they found themself at the page, they did not initially indicate.

To make a simple manual URL Redirection, just follow these few steps.

You can write your code in a WordPress Custom HTML block or e.g. Notepad.

Step 1.

First, start with a body element. You will be writing the code inside this element.

<body></body>

Step 2.

Next, you write what text you want to be visible. Our text will be “The updated page is in another URL.”. The p element is a paragraph element. You can make your text heading-one (h1), heading-two (h2), heading-three (h3), heading-four (h4), heading-five (h5) or heading-six (h6) sized. You can make the text custom size with CSS (next step).

<body><p>The updated page is in another URL.</p></body>

Step 3. (optional)

If you wish to edit the look of the text, please read this step.

Now, you can make the text size different, and other text properties custom. You’ll first need to give your text an id or a class. Our text’s id will be “text”. <body><p id=“text”>The updated page is in another URL.</p></body>. Next you’ll need to make a CSS file (.css) or in an HTML file, inside style elements. To change text size, write [your text’s id with a hashtag (#) infront] {font-size: {your text size number in pixels}px;} inside the style elements.

Step 4. (optional)

If you wish to edit the look of the page, please read this step.

You can also make the page look different. For our page the background will be dark blue and the text colour will be gold.

Gold Text Colour:

[your text’s id with a hashtag (#) infront] {color: gold;}

Dark Blue Background Colour:

body {background-color: darkBlue;}

URL Redirection Example
Example URL Redirection

Last Notice.

The speech marks (“”) are the wrong speech marks. You will have to rewrite the speech marks in your code editor e.g. WordPress Custom HTML.

There can never be multiple same ids in one HTML file. There can only be one id in each element. Ids cannot have any special characters except underline (_) and hyphen (-).

There can be multiple same classes in one HTML file and elements can have multiple classes separated by spaces. Classes cannot have any special characters except underline (_)

If you need professional help, try checking the internet for websites that teach you HTML/CSS/JavaScript.

You can preview your code in WordPress by making a post, then adding a block, and then choosing “Custom HTML”. Then you can write your code there and then click “Preview” to see what your code does.

Coding Help 

How To Make An HTML Navigation Menu