Description
Service name
Heroku
Proof
Heroku has same virtual hosting concept as other cloud providers. Various *.herokudns.com
subdomain respond with the same set of A records. HTTP Host matters for correct domain resolution (as in other providers). There is also an possibility to upload own certificate in order to work on custom domain as well (e.g. GitHub Pages doesn't support this and thus you cannot have HTTPS enabled with custom domain set).
Step-by-step:
- Open new Heroku app.
- Choose name and region (no effect on takeover).
- Push PoC application using git to Heroku. The process is described in Deploy tab.
- Switch to Settings tab.
- Scroll to Domains and certificates.
- Click Add domain.
- Provide the domain name you want to takeover, click Save changes.
- It might take some time for settings to propagate.
To verify:
http -b GET http://{DOMAIN NAME} | grep -F -q "//www.herokucdn.com/error-pages/no-such-app.html" && echo "Subdomain takeover may be possible" || echo "Subdomain takeover is not possible"
(there is an iFrame with aforementioned URL present)
Documentation
There are three domains that Heroku uses:
- *.herokudns.com
- *.herokuapp.com
- *.herokussl.com
At the moment, I can confirm only proper working on herokudns.com
. IIRC, herokuapp.com
is a domain that was used prior and is now deprecated, however old DNS records still work. I would like to hear more in comments from somebody who has experience with the remaining two.