Note: This guide applies only to the legacy Drupal site hosted on Pantheon (the old portlandhumanists.org). It is not relevant to the new Astro site hosted on Netlify.
When adding a subdomain (e.g. members.portlandhumanists.org) that points to the Pantheon-hosted Drupal site, three things need to happen: DNS, HTTPS verification, and allowing the domain in the app.
Step 1 — Add the domain in Pantheon
- Log into dashboard.pantheon.io
- Open the site → Live environment → Domains / HTTPS
- Click Add Domain and enter the subdomain (e.g.
members.portlandhumanists.org)
- Pantheon will give you a TXT record for HTTPS verification — copy the Host and Value
Step 2 — Add DNS records in Namecheap
- Log into Namecheap → Advanced DNS for
portlandhumanists.org
- Add a CNAME record:
- Host:
members
- Value:
live-hgp7.pantheonsite.io
- Add a TXT record for HTTPS verification:
- Host:
_acme-challenge.members (do NOT include .portlandhumanists.org — Namecheap adds it automatically)
- Value: (the value Pantheon gave you)
Step 3 — Verify HTTPS in Pantheon
- Back in Pantheon → Domains / HTTPS → click Details next to the subdomain
- Click Verify Ownership
- If it generates a new TXT value, update the Namecheap record and verify again
Step 4 — Allow the subdomain in settings.php
The Drupal app has a hardcoded redirect to www.portlandhumanists.org. Any new subdomain must be added to the allowed list in sites/default/settings.php around line 606:
$allowed_domains = ['www.portlandhumanists.org', 'member.portlandhumanists.org', 'members.portlandhumanists.org'];
$primary_domain = in_array($_SERVER['HTTP_HOST'], $allowed_domains) ? $_SERVER['HTTP_HOST'] : 'www.portlandhumanists.org';
Add the new subdomain to the $allowed_domains array, then deploy:
git add sites/default/settings.php
git commit -m "Allow [subdomain] without redirect"
git push origin master
Then deploy Dev → Test → Live in the Pantheon dashboard.
Step 5 — Clear Varnish cache
After deploying to Live, clear the cache in Pantheon: Live environment → Clear Caches. Otherwise the old redirect may be ser...