I recommend you make a redirect from your web server, if you use apache add it from the .htaccess and if you use nginx add the redirection in the vhostyes, but not affecting the eamil
Edit your .htaccess:
Code:RewriteEngine On RewriteRule ^(.*)$ http://newdomain.com/ [R=301]
You can also use this for aditional nginx or apache instructions:
How to enable Apache or Nginx rewrite rules in Plesk?
This will not effect the emails, it's just a content forward.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.yourdomain.tld$ [NC]
RewriteRule ^(.*)$ https://www.anotherdomain.tld%{REQUEST_URI} [R=301,NC,L,QSA]
To set up email forwarding for an email address:
To switch off mail forwarding:
- Go to Mail > email address > Forwarding tab.
- Select the Switch on mail forwarding checkbox.
- 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.
- Click OK.
- 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.
Otherwise if you want to forward mails to another receiver, may in the case that this mailbox is not available, use MX-Records.
- Go to Mail > email address > Forwarding tab.
- Clear the Switch on mail forwarding checkbox, and click OK.
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.
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:
- Go to Plesk > Home > Subscriptions > example.com
- Click Add New Domain button
- Choose Forwarding option in Hosting type section.
- Press OK
However, the mail service can be activated on the forwarded domain.
You can recive mails on a domain wich redirects.