~2 min read • Updated Feb 18, 2026
1. Overview
A redirect automatically sends users from one URL to another. While cPanel’s Redirects interface is usually sufficient, some applications require manual configuration inside the .htaccess file.
2. When Manual Redirects Are Necessary
Manual redirects may be required in the following situations:
- A third‑party application only reads rules inside its own
.htaccessblock. - A CMS (such as WordPress) overrides or conflicts with redirects created in cPanel.
- Redirects fail due to rule order or application‑specific requirements.
3. How to Edit Your .htaccess File
To manually edit your .htaccess file, follow these steps:
- Open cPanel → File Manager.
- Click Settings in the top-right corner.
- Enable Show Hidden Files (dotfiles).
- Click Save.
- Locate the
.htaccessfile inside thepublic_htmldirectory.
You can now edit the file directly using File Manager’s built‑in editor.
4. Examples of Manual Redirects
4.1 301 Permanent Redirects
Redirect an entire site:
Redirect 301 / http://example.com/Redirect a single page:
Redirect 301 /original.html http://www.example.com/new.htmlRedirect a directory:
Redirect 301 /old-directory http://www.example.com/new-directory4.2 302 Temporary Redirects
Temporary redirect for an entire site:
Redirect 302 / http://example.com/Temporary redirect for a page:
Redirect 302 /original.html http://www.example.com/new.htmlTemporary redirect for a directory:
Redirect 302 /old-directory http://www.example.com/new-directory4.3 Drupal Redirect Example
Some CMS platforms, such as Drupal, require redirect rules to be placed at the top of the .htaccess file. Example:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{HTTP_HOST} ^drupal\.user\.example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.drupal\.user\.example\.com$
RewriteRule ^cptest$ "http://cpanel.net/" [R=301,L]
</IfModule>
In this example:
drupal.user.example.comis the URL being redirected.http://cpanel.net/is the destination URL.
5. Conclusion
Manual redirects give you full control over URL behavior, especially when working with CMS platforms or applications that override cPanel’s default redirect rules. By editing your .htaccess file directly, you can ensure your redirects function exactly as intended.
Written & researched by Dr. Shahin Siami