How to Set Up URL Redirects on Shared Hosting

Redirects tell browsers and search engines that a page has moved. Whether you're rebranding, restructuring your site, or just fixing a broken URL, dotCanada shared hosting gives you a couple of easy ways to set up redirects.

Option 1: Using cPanel Redirects

  1. Log in to cPanel and go to the Domains section.
  2. Click Redirects.
  3. Choose the redirect type: 301 (Permanent) or 302 (Temporary).
  4. Select the domain, enter the path you want to redirect from, and the full URL to redirect to.
  5. Click Add.

cPanel automatically writes the redirect rule to your .htaccess file for you.

Option 2: Using .htaccess Directly

For more control, you can add redirect rules manually. A basic 301 redirect looks like this:

Redirect 301 /old-page/ https://www.yourdomain.ca/new-page/

For pattern-based redirects, use mod_rewrite:

RewriteEngine On RewriteRule ^old-page/?$ /new-page/ [R=301,L]

Redirecting an Entire Domain

To redirect one domain to another (e.g., the non-www version to www), add this to your .htaccess:

RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain\.ca [NC] RewriteRule ^(.*)$ https://www.yourdomain.ca/$1 [R=301,L]

If you need help setting up complex redirect scenarios, contact our support team and we'll get it sorted.

100% Satisfaction Guarantee

We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.

Ready to Get Started?

Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.

Get Started Today