Knowledgebase: How to 301 Redirect (WordPress & Static HTML)
301 redirects are used to permanently redirect one URL to another. This is essential for SEO, fixing broken pages, or forwarding an entire site.
A 301 redirect is a permanent redirect that tells browsers and search engines to forward visitors from one URL to another. This is useful when:
-
You've changed page URLs
-
You're consolidating domains
-
You're moving content
📦 Part 1: 301 Redirects in WordPress
WordPress doesn’t require editing server files directly. Instead, you can use a plugin or modify the .htaccess
file (advanced users only).
✅ Option 1: Use a Plugin (Recommended)
Plugin: Redirection
To Redirect a Page:
-
Install & activate the Redirection plugin.
-
Go to Tools > Redirection.
-
Under Add new redirection:
-
Source URL:
/old-page/
-
Target URL:
/new-page/
(or full URL)
-
-
Click Add Redirect.
This sets up a 301 redirect behind the scenes.
🌐 Redirect the Whole Site (Domain to Domain)
Advanced Option: Use .htaccess
(via File Manager)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [L,R=301]
📌 Replace with your actual domain names.
📝 Part 2: 301 Redirects in Static HTML
On PBN LTD static hosting, redirects are handled in the .htaccess
file. You can find and edit this file in your File Manager, located in the left-hand menu under the Site Functions section.
🔄 Redirect a Single Page
To redirect /old-page.html
to /new-page.html
, add this to your .htaccess
:
Redirect 301 /old-page.html /new-page.html
Or use a full URL:
Redirect 301 /old-page.html https://yourdomain.com/new-page.html
🌐 Redirect the Entire Site
To redirect all traffic from one domain to another:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [L,R=301]
This must be placed at the top of the .htaccess
file.
🛠️ Tips for Static HTML Redirects
-
You must have a
.htaccess
file in the root directory. -
Always back it up before making changes.
-
Avoid syntax errors (extra spaces, missing tags) to prevent 500 errors.
-
You can create a
.htaccess
file manually in File Manager if it doesn’t exist.
✅ Final Notes
-
301 = Permanent redirect (best for SEO)
-
Use redirects responsibly to avoid broken site structures or redirect loops.
-
If you’re unsure, reach out to our support for guidance before applying changes.
View other On-Site Issues articles, or continue viewing other knowledgebase articles.