Skip to content
EnterraHost
Products
Tools
Hosting Email Support Client Area Find a domain

Add a redirect and choose between 301 and 302 correctly

A redirect sends a request for one path to another address. It is how you keep a link working after a page moves, and the reason a URL you published two years ago still lands somewhere sensible.

You can write rules by hand in .htaccess and this panel does the same job with a form and a list. The form is quicker, the list is visible to anyone else with panel access, and neither one is better at the actual forward.

Adding a redirect

Open Advanced, then Redirects. Choose Add redirect and a row appears with four controls.

Status is a dropdown offering 301 and 302. Which one you want is the subject of the next section.

The Add redirect form. A table headed STATUS, DOMAIN, SLUG and DESTINATION URL holds one row with the status dropdown set to 301, the domain greyed out, a slash and a slug reading old-link, an arrow, and a scheme dropdown reading https:// beside a destination of yourdomain/new-link. Cancel and Add sit below.

Domain is fixed to the site you are in and shown greyed out, which is a useful reminder that this list belongs to one website.

Slug is the path being redirected. The slash before it is part of the field, so you type old-link, not /old-link.

Destination URL has its own scheme dropdown, defaulting to https://, and then the address. Type yourdomain.com/new-link and the result is the full https://yourdomain.com/new-link.

Choose Add. The entry becomes active immediately, and appears in a list below with its status, domain, slug and destination.

One is permanent, the other is temporary

301 tells the requester the move is permanent. 302 says it is temporary and the original address should be kept for later.

The practical difference is caching. A browser that receives a 301 may remember it for a long time and stop asking the server at all, which is exactly right for a page that has genuinely moved and a nuisance for anything you change your mind about. A 302 is not cached the same way, so reversing it works immediately.

Search engines treat the two differently for the same reason. A 301 is understood as the new home for that content and the ranking signal moves with it. A 302 says the original is still the canonical location, so nothing accumulates at the temporary address.

A Force HTTPS redirect is the same mechanism doing a different job at the server level, and worth reading before you add anything that points at an http:// address.

The rule that follows is simple. Use 301 for a move you mean to keep. Use 302 for anything you might undo, including a test, a short campaign landing page, or a temporary detour during a rebuild.

If you are unsure, pick 302. Changing a 302 to a 301 later is easy. Undoing a 301 in a browser that has already cached it is not, because you cannot reach into the visitor's cache to take it back.

Editing and deleting

Each row has a three dot menu with Edit and Delete.

Editing opens the row as a form again, with Save, Cancel and a red Delete at the left. Delete is separated from Save on purpose, which is worth noticing before you click the wrong one.

The same redirect row in edit mode, with the 301 dropdown, the fixed domain, the old-link slug and the https destination path. A red Delete button sits at the left below the row, and Cancel and Save at the right.

Deleting an entry does not delete the page it pointed at. It only stops the forward, so the original path starts returning whatever it would have returned without the rule, usually a 404.

That is worth thinking about before you tidy up. A rule added for an old campaign is still doing work if the old link appears anywhere, and a dead 404 is worse than a working forward. Keeping it costs nothing.

When a rule does not seem to apply

Check the exact path first. The slug matches the request path after the domain, so a rule for old-link does not catch old-link/ with a trailing slash, and a rule for a subdirectory needs that subdirectory in the slug.

Then check for a competing rule. .htaccess can contain these too, and a server level rule can fire before this list is consulted. If you have Force HTTPS on and a redirect pointing at an http:// destination, the two can send a visitor back and forth, which browsers report as too many redirects rather than as a configuration mistake.

Summarize this guide with

You need an account with the assistant you choose. It fetches the guide itself, and you send the prompt, not us.

Every guide in this category is on the Shared Web Hosting page.