> ## Documentation Index
> Fetch the complete documentation index at: https://speedypage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up redirects

> How to create URL redirects in cPanel, including permanent (301) and temporary (302) redirects, wildcard redirects, and www handling.

Redirects send visitors from one URL to another. Common uses include pointing an old domain to a new one, sending visitors from a specific page to its replacement, or forwarding a short URL to a longer one.

## Create a redirect

<Steps>
  <Step title="Open the Redirects page">
    Log in to cPanel through your [client area](https://my.speedypage.com) or at `yourdomain.com/cpanel`. Go to **Domains** and click **Redirects**.
  </Step>

  <Step title="Choose the redirect type">
    Select a type from the **Type** menu:

    * **Permanent (301)** tells browsers and search engines that the page has moved permanently. Search engines update their index to the new URL.
    * **Temporary (302)** tells browsers and search engines the move is temporary. Search engines keep the original URL in their index.
  </Step>

  <Step title="Select the domain">
    Choose the domain from the dropdown, or select **All Public Domains** to redirect every domain on your account.
  </Step>

  <Step title="Set the source path">
    In the `/` text box, enter the path you want to redirect from. Leave it empty to redirect the entire domain. For example, enter `old-page` to redirect `yourdomain.com/old-page`.
  </Step>

  <Step title="Set the destination URL">
    In the **Redirects to** field, enter the full destination URL including the protocol, for example `https://example.com/new-page`.
  </Step>

  <Step title="Configure www handling">
    Choose how the redirect handles the `www` prefix:

    * **Only redirect with [www](http://www).** — only redirects requests that include `www.`
    * **Redirect with or without [www](http://www).** — redirects both `www.` and non-`www.` requests
    * **Do Not Redirect [www](http://www).** — skips requests that include `www.`
  </Step>

  <Step title="Save">
    Click **Add**. The redirect appears in the Current Redirects table.
  </Step>
</Steps>

<Tip>
  After creating a redirect, click the link under **Directory** in the Current Redirects table to test it.
</Tip>

## Wildcard redirects

Enable the **Wild Card Redirect** option when you want all pages within a directory to redirect to the same path on the destination domain.

For example, if `olddomain.com` redirects to `newdomain.com` with a wildcard, then `olddomain.com/about` redirects to `newdomain.com/about`, `olddomain.com/contact` redirects to `newdomain.com/contact`, and so on.

This is useful when migrating an entire site to a new domain while preserving the URL structure.

## Edit or delete a redirect

You cannot edit an existing redirect. To change one, delete it from the Current Redirects table and create a new redirect with the updated settings.

To delete a redirect, click **Delete** next to it and confirm with **Yes**.

<Note>
  Browsers cache redirects. After deleting a redirect, visitors may need to clear their browser cache before the change takes effect.
</Note>

## Redirects and WordPress

When you add a redirect through cPanel, it writes rules to the bottom of the `.htaccess` file. WordPress and some other applications manage their own rewrite rules in `.htaccess` and may ignore rules added below their block.

If a redirect isn't working on a WordPress site, you have two options:

* Use a WordPress redirect plugin instead of cPanel's redirect tool.
* Manually add the redirect rule inside the WordPress section of your `.htaccess` file using File Manager or FTP.

<Warning>
  If you edit `.htaccess` manually, keep a backup of the original file. A syntax error can take your site offline.
</Warning>
