# Domains

# Domain Naming Scheme

Naming Scheme Format: app.project.org.domain.tld

Base Domain Deployment Stage org Dashboard URL Project App / Dashboard URL Project App URL
solarix.tools internal N/A [project].solarix.tools [app].[project].solarix.tools
solarix.dev testing [org].solarix.dev [project].[org].solarix.dev [app].[project].[org].solarix.dev
solarix.site staging [org].solarix.site [project].[org].solarix.site [app].[project].[org].solarix.site
solarix.host production [org].solarix.host [project].[org].solarix.host [app].[project].[org].solarix.host

# Special Case Names

For special case org, project, or app names that require further period separators (i.e. edu, gov, etc) the appropriate section is extended as necessary: api.oceans.fbi.gov.solarix.dev

# Domain Usage

Domain Use
solarix.tools Internal use software, including CRMs, Dashboards and other 'get work done via this software' installs
solarix.dev Development space for semi-public internal ops, usually in-progress work
solarix.site Public staging area, used to display in-progress work to clients that is going to be shared among client internal/external stakeholders (think us + client + client ad agency + client board members)
solarix.host Public hosting for various clients websites and projects

# Route53 (DNS)

To route a proper subdomain scheme to a new app instance you must generate one or more new Route53 resource records.

Root domains or subdomains should use asterisk (*) as a catchall for all non-specific domains. Consider these records:

  • solarix.dev A 54.213.172.237 300
  • *.solarix.dev A 54.213.172.237 300
  • domains.solarix.dev A 123.123.123.123 300

These records produce the following behavior:

  • A request to solarix.dev resolves to the first explicit record of 54.213.172.237.
  • A request to random.solarix.dev resolves to the second wildcard record of 54.213.172.237.
  • A request to domains.solarix.dev finds the explicit third record and resolves to 123.123.123.123.

For more information see DomainNameFormat

# Hosted Zone IDs

The Hosted Zone ID is used for most AWS CLI commands, so be sure to use the proper ID as seen below.

Base Domain Deployment Stage Hosted Zone ID
solarix.tools internal Z0822964120SHM2V59IM
solarix.dev testing Z08211673J841S57BTNZ
solarix.site staging Z08202973TXFDDYUODO3
solarix.host production Z082084539J3UP3RI8BM

# Create Resource Records

  1. Create JSON configuration file specifying new resource records, e.g:
{
  "Comment": "solarix.site - Creating default A record sets.",
  "Changes": [
    {
      "Action": "CREATE",
      "ResourceRecordSet": {
        "Name": "solarix.site",
        "Type": "A",
        "TTL": 300,
        "ResourceRecords": [
          {
            "Value": "34.223.160.133"
          }
        ]
      }
    },
    {
      "Action": "CREATE",
      "ResourceRecordSet": {
        "Name": "*.solarix.site",
        "Type": "A",
        "TTL": 300,
        "ResourceRecords": [
          {
            "Value": "34.223.160.133"
          }
        ]
      }
    }
  ]
}
  1. Execute route53 change-resource-record-sets command pointing to config with matching hosted zone id:
  • Bash
  • PowerShell
aws route53 change-resource-record-sets \
  --change-batch file://awscli\route53\solarix.site\create-default-A-records.json \
  --hosted-zone-id Z08202973TX0FDDYUODO3
  1. Confirm result shows pending change:
{
  "ChangeInfo": {
    "Id": "/change/C00393492QWT0PRSJZZIQ",
    "Status": "PENDING",
    "SubmittedAt": "2020-04-11T21:52:57.242000+00:00",
    "Comment": "solarix.site - Creating default A record sets."
  }
}

For more information see Change Resource Record Sets.

# Get Nameservers

To get nameserver data use the get-hosted-zoned command:

aws route53 get-hosted-zone --id "/hostedzone/Z08211673J8S41S57BTNZ"

Output:

{
  "HostedZone": {
    "Id": "/hostedzone/Z08211673J8S41S57BTNZ",
    "Name": "solarix.dev.",
    "CallerReference": "F707326D-CE51-F099-8FFC-D571BEC6BA80",
    "Config": {
      "Comment": "",
      "PrivateZone": false
    },
    "ResourceRecordSetCount": 4
  },
  "DelegationSet": {
    "NameServers": [
      "ns-411.awsdns-51.com",
      "ns-1809.awsdns-34.co.uk",
      "ns-777.awsdns-33.net",
      "ns-1174.awsdns-18.org"
    ]
  }
}