redirect website to external server

grapecar

Member
Aug 2, 2021
6
0
1
Guimarães
cPanel Access Level
Root Administrator
hey there!
i have a CPanel domain server.

I actually made a website in an external server with some features which aren't enabled on that Linux server at CPanel and I need to keep mailserver in their server.
I was trying to move all DNS requests through the website for the external server but everytime I tried I can't receive any email but it sends. I set the A record to mail.domain.com to CPanel server and after that, I just tried to add two records to the external server.

www.domain.pt.3600Aexternal.IP
domain.pt.3600MXPriority: 0
Destination: mail.domain.pt
domain.pt.3600Aexternal.IP

Can I try to redirect all requests to the website without them blocking external mail requests?
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,028
313
cPanel Access Level
Root Administrator
Hey there! It looks like you're just missing the additional A record for the "mail" subdomain. You'll want the main domain.pt to point to the remote website, the MX record is correct how you've configured it, and then the mail.domain.pt record to point to your local IP address. Can you try that and see if that gets things working how you expect?
 

grapecar

Member
Aug 2, 2021
6
0
1
Guimarães
cPanel Access Level
Root Administrator
Hey there! It looks like you're just missing the additional A record for the "mail" subdomain. You'll want the main domain.pt to point to the remote website, the MX record is correct how you've configured it, and then the mail.domain.pt record to point to your local IP address. Can you try that and see if that gets things working how you expect?
hi! I already had this pointer- mail.domain.pt A set to internal CPanel server. When I change the third record that I showed you before (domain.pt -3600 - A - external IP) to the external IP (which is where I have the website) is when the mail server 'crashes'.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,028
313
cPanel Access Level
Root Administrator
I think there's some confusion on which IP address should point where. To avoid that in the following examples, the "external" IP is the IP address of the remote webserver, while the "internal" IP is the IP of the mail server. You would have the following three records in place:

domain.com. IN A external
mail.domain.com. IN A internal
domain.com. IN MX mail.domain.com.

Does that help?
 

grapecar

Member
Aug 2, 2021
6
0
1
Guimarães
cPanel Access Level
Root Administrator
I think there's some confusion on which IP address should point where. To avoid that in the following examples, the "external" IP is the IP address of the remote webserver, while the "internal" IP is the IP of the mail server. You would have the following three records in place:

domain.com. IN A external
mail.domain.com. IN A internal
domain.com. IN MX mail.domain.com.

Does that help?
No, you're right. That's the configuration that I thought works but when I change the domain.com A record to the external IP like you said there is when the mail server stops. the other records are as you mentioned.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,028
313
cPanel Access Level
Root Administrator
That's very odd, as that's a standard DNS configuration that shouldn't be causing issues.

If you have root access to the machine it would be best to put in a ticket so we can see the issue ourselves and find what is causing that behavior. If you are able to submit a ticket, please post the number here so I can follow along.
 

grapecar

Member
Aug 2, 2021
6
0
1
Guimarães
cPanel Access Level
Root Administrator
That's very odd, as that's a standard DNS configuration that shouldn't be causing issues.

If you have root access to the machine it would be best to put in a ticket so we can see the issue ourselves and find what is causing that behavior. If you are able to submit a ticket, please post the number here so I can follow along.
I can't submit a ticket because I don't have any WHM account to set root user permissions to check my Support Access ID :D
I will try to figure it out how to sent the ticket as soon as possible
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,028
313
cPanel Access Level
Root Administrator
If you don't have root access you would need to reach out to your hosting provider or datacenter for support, as we can only handle tickets for users with full root access to the system.

If you do have root access and there are issues with the machine preventing you from creating a ticket, please email [email protected] to get the ticket creation process started.
 
  • Like
Reactions: grapecar

grapecar

Member
Aug 2, 2021
6
0
1
Guimarães
cPanel Access Level
Root Administrator
If you don't have root access you would need to reach out to your hosting provider or datacenter for support, as we can only handle tickets for users with full root access to the system.

If you do have root access and there are issues with the machine preventing you from creating a ticket, please email [email protected] to get the ticket creation process started.
do you want the inquiry's ID or you can't do anything about that?