Two domains pointing to one IP


#1

I have looked in previous community postings and Google search but not finding the exact answer. I have two domains setup in Cloudflare:

Domain1 has been set up and is working fine. This is the original site created and hosted.
Domain2 was temporarily pointing to a different IP (A record) until ready to point it to the same IP as Domain1

If I just change the A record of Domain2 to point to the same IP as Domain1, I get a 404. Do I need to do something at the hosting provider to accept this new domain?

On the hosting provider, I created an alias for Domain2 and have it redirecting to Domain1

What am I missing?

Thanks!


#2

Generally your host (the origin server) has to accept requests from that new vhost/hostname (eg www.example.com) as well as requests for existing vhost/hostname.

That should have it set up correctly, but if it doesn’t work, you should contact your hosting provider. If you did this in something like cpanel, it may not have all the proper setup that is required for the actual web server (apache/nginx) to accept the new hostname.


#3

I got it working. I had to go into the Page Rules and set up a rule for a forwarding URL. It works fine now.


closed #4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.