Creating a URL Redirect

RSS

Creating a URL Redirect

Last updated November 2nd, 2017

Introduction

Redirects allows you to easily redirect a domain to another website. You can setup a redirect from a domain (e.g. example.com) or any subdomain (e.g. blog.example.com) to another URL. Redirects are managed through the Domains module under the Redirects section.

There are two types of redirects, 301 Moved Permanently and 302 Moved Temporarily. If you would like to redirect for example, a .co.nz domain to the new .nz domains, the correct type is 301 Moved Permanently.

The domain's name servers must be pointed at SiteHost's name servers, and the zone must not be using a zone template.

HTTPS source URLs are not currently supported.

Example

We will walk through an example of creating a redirect from sitehost.example.co.nz to sitehost.nz/about/team.

  1. Visit the SiteHost Control Panel
  2. Go to the Domains module, and click Redirects.
  3. Click Create Redirect and fill out the form.

Creating a redirect

A redirect entry will now appear on the list.

Redirect list

Redirects will take effect once the DNS records have propagated. This time is dependent on the TTL set for the zone, which by default is 60 minutes.

Extended Examples

Catch-all redirect

  • example.co.nz

Paths that don't match other rules will use this rule.

Root-only redirect

  • example.co.nz/

This rule only matches the url example.co.nz and example.co.nz/.

Path redirect

  • example.co.nz/foo
  • example.co.nz/foo/bar

Redirects only example.co.nz/foo and example.co.nz/foo/bar respectively. Uses the most specific path first.

Wildcard redirect

  • example.co.nz/baz/*example.nz/baz/*

This rule redirects all URLs starting with example.co.nz/baz and passes the remaining path to example.nz/baz.

For example:

  • example.co.nz/baz/fooexample.nz/baz/foo
  • example.co.nz/baz/foo/barexample.nz/baz/foo/bar

Attribution

Powered by the open sourced project, redirect.name.

Can we improve this article? Suggest an improvement to this article.

Suggest an Improvement

Thank you for helping us to improve this Knowledge Base article. Please type your suggestions below:

Still need help? Get in touch with us.

If you aren't able to find the help you need then please send us a question and we can help you further.