Custom Domain Names

AppFog allows you to associate a custom domain name with your application, so that when a user types www.myamazingwebapp.com into their browser's address bar, your web application is loaded.

To do this, follow the steps below:

Web Console

  1. Head over to the app console and click on your app.
  2. Click on the "Domain Names" tab on the left.
  3. Add your custom domain name in the field and hit the "Update" button.

Alternatively, you can use the CLI to map the custom domain to your application -- follow the instructions below.

Command-line Tool

  1. If you haven't already, install the af command line tool and log in.
  2. Map the domain. $af map

For example:

$ af map {appname} www.example.com

Update your DNS Records

Note: If you intend to use SSL with your site, STOP HERE and go check out our SSL for Custom Domains documentation. It includes information on the different DNS configuration needed for SSL Endpoint termination.

We recommend using the www. subdomain as your canonical domain. Here's how to do that:

Redirect Your Root Domain

At your DNS host, set up a redirect (302) from your root domain (yourdomain.com) to www.yourdomain.com.

This is a fairly standard tool that DNS services provide. If you don’t see an option for it at your domain host, contact their support services and they should be able to do that for you. If your DNS provider does not offer the redirect option it is possible to set up an A Record for your root domain. Please contact our Support staff and they will provide an IP address. This is not our recommended configuration. Please be aware that these IP addresses are subject to change without prior notice.

Create a CNAME Alias

Depending on which infrastructure your app is running on, create a CNAME alias record for www.yourdomain.com to:

CenturyLink Cloud (Santa Clara, CA):

cname01.uc01.clc.af.cm

AWS US East (Virgina):

cname01.aws.af.cm

AWS Europe West (Ireland):

cname01.eu01.aws.af.cm

AWS Asia Southeast (Singapore):

cname01.ap01.aws.af.cm

That's it! DNS propagation can take anywhere from a few minutes to 48 hours dep ending on your location, but once that's finished your app should resolve at your new custom domain.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.