On a previous post we saw how to deploy a PHP application in appfog using appfog CLI. appfog gives you a domain for your newly created aaplication which is not so beautiful at all. Such as (http://YOUR-APP-NAME.aws.af.cm/) or something like that according to your choosen region/infrastructure while creating the app.
Today we will point a godaddy domain to a appfog application. For this you will have to first go to your app under your appfog account. Then select the “Domain Names” from left navigation. Here you can see the domain name already assigned to your application and few more blank fields for domain names to be added.
I have added http://www.nuhil.net as the second domain name. Then I added a “A” record and a “CNAME” record under my godaddy domain management panel using the DNS manager.
If you wait few hours after changing the records in your domain end, then this will point the full domain for example http://www.nuhil.net to the appfog application but if you type the naked one like, http://nuhil.net then it will show a 404 not found appfog message. For the solution I did a forwarding under my godaddy account using the “forwarding domain tool” to forward the naked domain to full domain.
This forwarding may cause a change on your “A” record you just created manually according to appfog’s suggestion. But no need to worry. The “CNAME” can take care of all the rest.