Skip to main content
Blog|
Knowledge base

Redirects (301 / 302)

|
Feb 28, 2026|3 min read
KNOWLEDGE BASERedirects (301 / 302)HOSTNEYhostney.comAugust 21, 2023

Redirects forward visitors from one URL to another. You can use them when you rename a page, restructure your website, or move content to a different domain. Hostney handles redirects at the nginx level, so they’re fast and don’t require any code changes.

Go to Hosting > Redirects to get started.

Redirect types#

301 (Permanent) – Tells browsers and search engines that the page has moved permanently. Browsers cache this redirect, and search engines transfer the original page’s ranking to the new URL. Use this for pages that have permanently moved.

302 (Temporary) – Tells browsers and search engines the move is temporary. The redirect is not cached, and search engines keep indexing the original URL. Use this during maintenance, A/B testing, or any situation where you plan to bring the original URL back.

When in doubt, use 301. Most redirects are permanent.

Creating a redirect#

The form at the top of the page has four fields:

  1. Website – Select which website the redirect applies to.
  2. Source path – The old path you want to redirect from. The website’s URL is shown as a prefix, so you only need to enter the path portion (e.g.,  old-page/ ). A leading  /  is added automatically if you leave it out.
  3. Redirect type – Choose 301 (permanent) or 302 (temporary).
  4. Destination URL – The full URL to redirect to (e.g.,  https://example.com/new-page/ ). This can be a page on the same website or a completely different domain.

Click Show preview to see a live summary of the source, destination, and type before saving.

Click Save redirect to create it. Changes take 1-2 minutes to apply.

Validation rules

The source path can contain letters, numbers, underscores, dots, and forward slashes. Double slashes are not allowed.

The destination must be a valid HTTP or HTTPS URL. The system blocks path traversal attempts, script injection, and suspicious system paths for security.

You can’t create two redirects with the same source path on the same website. If you need to change where a redirect points, delete the existing one and create a new one.

Managing redirects#

The table below the form lists all your redirects with:

  • Website – The domain the redirect applies to
  • Redirect from – The source path
  • Redirect to – The destination URL
  • Type – 301 or 302

The table is searchable and sortable by any column.

Deleting a redirect

Click the dropdown menu on any row and select Delete. The confirmation modal shows the redirect details. Type DELETE to confirm.

Removing a redirect means visitors to that source path will no longer be forwarded. The change takes 1-2 minutes to apply.

Good practices#

  • Avoid redirect chains. If page A redirects to page B, and page B redirects to page C, update page A to point directly to page C. Chains slow down page loads and confuse search engines.
  • Update internal links. After setting up a redirect, update any links within your website that still point to the old URL. Redirects are a safety net for external links and bookmarks, not a substitute for fixing your own references.
  • Use 301 for SEO migrations. When you permanently move content, a 301 redirect passes most of the original page’s search ranking to the new URL.
  • Keep temporary redirects temporary. If you set up a 302, remember to remove it when you no longer need it. Leaving temporary redirects in place indefinitely can cause indexing issues.

Related articles