Redirects send visitors from one address to another automatically. This guide covers the three you're most likely to need: forcing your site to use HTTPS, choosing between the www and non-www version of your domain, and redirecting old pages or extra domains to the right place.
Before you start
- To force HTTPS, your domain needs a working SSL certificate. Our free AutoSSL handles this for domains using our nameservers. If your site shows "Not secure", sort that first. See AutoSSL: install or fix your free SSL.
- Use a permanent (301) redirect for anything that has moved for good. Search engines pass your rankings on to the new address. Use a temporary (302) redirect only for short-term changes, such as a holding page.
Force HTTPS
- Log in to cPanel from your service page under Services → My Services (https://www.hooplahosting.co.nz/client/clientarea.php?action=services).
- Open Domains (type it in the cPanel search bar).
- Turn on the Force HTTPS Redirect switch next to your domain.
Everyone who visits http:// is now sent to https://. If the switch is greyed out, the domain doesn't have a valid certificate yet.
WordPress: also check that both addresses under Settings → General in your WordPress dashboard start with https://. If you see "Not secure" or a broken padlock after switching, some images or scripts are still loading over http://. A search-and-replace plugin such as Better Search Replace can update old http://yourdomain.co.nz links in your content. Take a backup before running it.
Redirect a page or a whole domain
- In cPanel, open Redirects.
- Type: choose Permanent (301) or Temporary (302).
- https?://(www.)?: choose the domain to redirect from, or ** All Public Domains **.
- Path (the box after the slash): leave it empty to redirect the whole domain, or enter a page, for example
old-page.htmlorservices/old. - Redirects to: enter the full new address, for example
https://yourdomain.co.nz/new-page/. - www. redirection: leave it on Redirect with or without www. unless you have a reason not to.
- Tick Wild Card Redirect if you're redirecting a whole domain and want
olddomain.co.nz/any-pageto go to the same page on the new domain. - Click Add.
To remove a redirect, find it in the Current Redirects list at the bottom and click Delete.
WordPress sites: for redirecting individual pages within WordPress, a plugin such as Redirection is easier to manage than cPanel, and avoids clashing with WordPress's own address rules.
Choose www or non-www
Your site works on both yourdomain.co.nz and www.yourdomain.co.nz, but it's best to pick one and redirect the other to it.
- WordPress does this automatically, based on the address set under Settings → General.
- Other sites: add these lines near the top of the
.htaccessfile in your site's folder (for examplepublic_html). In File Manager, click Settings and tick Show Hidden Files to see it. If the file doesn't exist, create it.
To always use non-www:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]
To always use www:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Download a copy of .htaccess before editing it, so you can put it back if something goes wrong.
Troubleshooting
- "Too many redirects" error: two redirects are sending visitors back and forth. Common causes are a cPanel redirect fighting a WordPress setting or plugin, or Cloudflare's SSL mode set to Flexible. If you use Cloudflare, set SSL/TLS to Full (strict). Then remove one of the redirects and clear your browser cache.
- The redirect doesn't seem to work: browsers remember 301 redirects. Test in a private or incognito window.
- 500 Internal Server Error after editing .htaccess: there's a typo in the file. Restore your copy, or remove the lines you added.
Need help?
If you get stuck, open a support ticket and we'll help.







