For obvious reasons, many folks will want to link their PHP Fog applications to a custom domain name, rather than the standard *.phpfogapp.com subdomain structure. Luckily, this is very easy to do. I’ll cover two of the most common scenarios below:
AWS Route 53
If you are using AWS Route 53, its best practice to create the following records in a Hosted Zone:
- An A-record for domain.com pointing to the PHP Fog ELB: http-1559636850.us-east-1.elb.amazonaws.com. Note this is done via an “Alias” and this ELB should never change.
- A CNAME record for www.domain.com pointing to cname01.phpfog.com
Also, make sure that you point the name servers at your domain registrar to the ones given under the NS record in Route 53. Here is an example screenshot of what you’re Route 53 dns configuration should look like.
Other DNS Providers
For all other DNS providers, a simple standard DNS configuration can be used. Create the following enteries in your zone:
- Three A records for domain.com to: 50.19.115.173, 184.72.222.30, and 107.22.161.126
- A CNAME record for www.domain.com pointing to cname01.phpfog.com
That’s it! Note that more information can also be found in the PHP Fog Documentation under “Custom Domain Names” but do note that a DNS redirect (302) is not needed, and most providers do not offer such a service. If yours does, it is an option, however.
If you have any questions, don’t hesitate to ask them in the comments section below.