Redirect www, but keep email hosted

stevebor1

Member
Jan 17, 2004
9
0
151
I have two accounts created in WHM, domain1.com and domain2.com. Both were serving a web pages and email.

I need to have all www traffic from domain1 to go to domain2, but allow domain1 to still use email and cpanel functionallity.

I think i can just park it on top, but i would have to recreate/migrate all the emails and passwords which i dont have access to.

Is there a way i can just config the dns reroute the www traffic?
 

MaestriaNick

Well-Known Member
Aug 6, 2008
159
3
68
You may need to setup rewrite rules in htaccess for domain1.com to redirect all request to domain2.com. Also you can setup redirects from Cpanel.
 
  • Like
Reactions: cPanelDon

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
13
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
I have two accounts created in WHM, domain1.com and domain2.com. Both were serving a web pages and email.

I need to have all www traffic from domain1 to go to domain2, but allow domain1 to still use email and cpanel functionallity.

I think i can just park it on top, but i would have to recreate/migrate all the emails and passwords which i dont have access to.

Is there a way i can just config the dns reroute the www traffic?
You may need to setup rewrite rules in htaccess for domain1.com to redirect all request to domain2.com. Also you can setup redirects from Cpanel.
What MaestriaNick has suggested should work without issue; I believe it is easiest to simply setup a redirect via cPanel as that will accomplish the desired task of redirecting HTTP traffic to a specific destination (via mod_rewrite entries in the applicable .htaccess file).

Redirects may be setup via cPanel at the following menu path, (with linked documentation):
cPanel: Main >> Domains >> Redirects
 

stevebor1

Member
Jan 17, 2004
9
0
151
I went ahead and just used the "redirect' from within cpanel. www gets redirected, but mail is still being handled correctly. Thanks.