• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question redirect domain without breaking email

Kingsley

Silver Pleskian
Hello;

Please is it possible to forward domain1.com to domain2.com but emails will be on domain1.com? i have search and could not find any resources for this.

Thanks
 
Edit your .htaccess:

Code:
RewriteEngine On
RewriteRule ^(.*)$ http://newdomain.com/ [R=301]
 
To set up email forwarding for an email address:

  1. Go to Mail > email address > Forwarding tab.
  2. Select the Switch on mail forwarding checkbox.
  3. Specify one or several email addresses to which email must be forwarded. When specifying email addresses, separate them with white spaces, commas, semicolons, or type each of them on a new line.
  4. Click OK.
  5. If you do not want to keep copies of forwarded messages in the mailbox, go to Mail > email address, clear the Mailbox checkbox, and click OK.
To switch off mail forwarding:

  1. Go to Mail > email address > Forwarding tab.
  2. Clear the Switch on mail forwarding checkbox, and click OK.
Otherwise if you want to forward mails to another receiver, may in the case that this mailbox is not available, use MX-Records.
 
A common misconception is that a subdomain is somehow completely different than a main domain. This however is simply not true, and redirecting a subdomain is almost identical to redirecting a main non subdomain. To redirect a subdomain you can modify the following example code to fit your specific needs:

Code:
RewriteEngine On

RewriteCond %{HTTP_HOST} ^example.yourdomain.tld$ [NC]

RewriteRule ^(.*)$ https://www.anotherdomain.tld%{REQUEST_URI} [R=301,NC,L,QSA]

So the redirect from the main domain, will not effect the subdomain and contrariwise.
 
To set up email forwarding for an email address:

  1. Go to Mail > email address > Forwarding tab.
  2. Select the Switch on mail forwarding checkbox.
  3. Specify one or several email addresses to which email must be forwarded. When specifying email addresses, separate them with white spaces, commas, semicolons, or type each of them on a new line.
  4. Click OK.
  5. If you do not want to keep copies of forwarded messages in the mailbox, go to Mail > email address, clear the Mailbox checkbox, and click OK.
To switch off mail forwarding:

  1. Go to Mail > email address > Forwarding tab.
  2. Clear the Switch on mail forwarding checkbox, and click OK.
Otherwise if you want to forward mails to another receiver, may in the case that this mailbox is not available, use MX-Records.

I do not want to forward emails, i want the emails to work on domain1.com for example emails will be sent to [email protected] but if you type domain1.com on the address bar you will be directed to domain.com
 
A common misconception is that a subdomain is somehow completely different than a main domain. This however is simply not true, and redirecting a subdomain is almost identical to redirecting a main non subdomain. To redirect a subdomain you can modify the following example code to fit your specific needs:

Code:
RewriteEngine On

RewriteCond %{HTTP_HOST} ^example.yourdomain.tld$ [NC]

RewriteRule ^(.*)$ https://www.anotherdomain.tld%{REQUEST_URI} [R=301,NC,L,QSA]

So the redirect from the main domain, will not effect the subdomain and contrariwise.

does not seems to redirect
 

Attachments

  • Apache   nginx Settings for healthable net   RioloHost.png
    Apache nginx Settings for healthable net RioloHost.png
    33.6 KB · Views: 5
Code:
<IfModule proxy_http_module>
 RewriteEngine On
 RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
 RewriteRule ^(.*)$ http://example2.com/$1 [P]
</IfModule>
 
Is there hosting on the .net?

You can create a forward without the apache:
  1. Go to Plesk > Home > Subscriptions > example.com
  2. Click Add New Domain button
  3. Choose Forwarding option in Hosting type section.
  4. Press OK
 
Otherwise, create in the httpdocs folder ".htaccess"

and copy this and save the file:
Code:
# Permanent URL redirect
RewriteEngine on
Redirect 301 healthable.net  healthable.org
 
Is there hosting on the .net?

You can create a forward without the apache:
  1. Go to Plesk > Home > Subscriptions > example.com
  2. Click Add New Domain button
  3. Choose Forwarding option in Hosting type section.
  4. Press OK

This means emails will not work on healthable.net
 
However, the mail service can be activated on the forwarded domain.

You can recive mails on a domain wich redirects.
 
Back
Top