Learn how to use Plesk to redirect a subdomain to another domain with simple methods like Forwarding, .htaccess, and server directives. Our Plesk Support Team is always here to help you.
Plesk Redirect a Subdomain to Another Domain in 3 Simple Ways
Sometimes, you may need to move traffic from one subdomain to a different domain. It could be for branding reasons, merging websites, or just pointing visitors to a new destination. Luckily, setting this up is simple if you know where to look. In this guide, you’ll learn how to plesk redirect a subdomain to another domain using three proven methods: Forwarding, .htaccess, and server directives. Each method works well depending on your needs, and you’ll see all the details with exact steps and code included.
An Overview
Using Plesk Forwarding Hosting Type
This option is the most user-friendly inside Plesk. However, you should note that it does not support HTTPS.
1. Log into Plesk
First, sign in to your Plesk control panel with your username and password.
2. Navigate to Websites & Domains
From the sidebar, click on Websites & Domains to view all domains and subdomains.
3. Select the Subdomain
Find the subdomain you want to redirect and click on its name to open the settings page.
4. Access Hosting Settings
Next, click on the Hosting Settings icon next to the subdomain.
5. Change Hosting Type
Inside Hosting Settings, locate the Hosting type option and hit the Change button.
6. Select Forwarding
From the dropdown menu, choose Forwarding as the new hosting type.
7. Enter Destination Address
Type in the complete URL of the target domain, such as:
http://www.targetdomain.com
8. Choose Forwarding Type
- Moved Permanently (301): Permanent redirect
- Moved Temporarily (302): Temporary redirect
9. Confirm Changes
Finally, click OK to save. If you see a warning about losing existing data, proceed only if you are sure.
Using the .htaccess File
For more flexibility and HTTPS support, you can redirect via .htaccess.
1. Access File Manager
Go to Domains > subdomain.example.com > File Manager in Plesk.
2. Create or Edit .htaccess File
If there’s no .htaccess file in the root of your subdomain, create one. Otherwise, edit the existing file.
3. Add Redirect Rules
Insert this code into the .htaccess file:
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
Replace http://www.example.com/ with your target domain.
4. Save Changes
Make sure to save the file so the rules apply immediately.
Using Additional Directives
For those comfortable with server-level settings, directives can handle redirection cleanly.
1. Access Apache & Nginx Settings
Go to Domains > subdomain.example.com > Apache & nginx Settings.
2. Add Additional Directives
In the additional nginx directives field, add:
return 301 http://www.example.com/;
Replace with your desired destination.
3. Save Configuration
Click OK to apply the changes.
Important Considerations
- HTTPS Support: Forwarding type doesn’t support HTTPS. Use .htaccess or directives instead if SSL is required.
- Backup Data: Before switching hosting types, back up any existing data linked with the subdomain.
- Test the Redirect: Once done, type the subdomain URL in your browser and check if it redirects properly.
[If needed, Our team is available 24/7 for additional assistance.]
Conclusion
Setting up a plesk redirect a subdomain to another domain is quick once you know these methods. The choice depends on your needs, simple forwarding, flexible .htaccess rules, or direct server directives. Follow these steps, and your visitors will reach the right destination every time.
0 Comments