Skip to content

My domain does not verify

After Verify on a custom domain’s row, MockHub checks two DNS records. When either is missing, the domain stays Awaiting DNS and a message names what MockHub could not see:

mocks.example.com is not verified yet
The ownership TXT record is not visible to us yet. They can take up to 24 hours to spread.

The other forms of the second line are The CNAME record for *.mocks.example.com is not visible to us yet. and Neither the ownership record nor the CNAME record for *.mocks.example.com is visible to us yet. The domain’s row shows the same, one line per check:

Ownership (TXT record): not seen yet
Traffic (wildcard CNAME record): not pointing here yet

The two checks are independent, and both must pass. Select DNS setup on the row to see the exact records to publish; Configure DNS for a custom domain explains each one. Adding and verifying domains needs the Admin role.

MockHub sees what public DNS sees. Ask it the same questions from a terminal, with your domain in place of mocks.example.com:

Terminal window
dig +short TXT _mockhub-challenge.mocks.example.com
dig +short CNAME any-name.mocks.example.com

The first command should print the value shown as TXT record value, which starts with mockhub-domain-verification=, in quotes. The second should print the CNAME record target, mockhub.dev, with a dot at the end. MockHub checks traffic the same way, at a new random name under your domain each time, never at the domain itself.

A record you have just created can take minutes, and sometimes hours, to be visible everywhere. If dig prints nothing, wait and run it again; once it prints the right value, select Verify. Verifying early does no harm, and nothing is lost when it fails.

The provider added the domain a second time

Section titled “The provider added the domain a second time”

Many DNS providers add the zone’s name to whatever you enter. Entering the full name _mockhub-challenge.mocks.example.com in the zone example.com then creates _mockhub-challenge.mocks.example.com.example.com, which nobody looks up. Check with:

Terminal window
dig +short TXT _mockhub-challenge.mocks.example.com.example.com

If that prints the value, edit the records to use the names relative to the zone, _mockhub-challenge.mocks and *.mocks, and select Verify again.

The TXT value is not the one this domain shows

Section titled “The TXT value is not the one this domain shows”

The value must be exactly what TXT record value shows, mockhub-domain-verification= and all. A value copied in part, or one from before the domain was removed and added again, does not match: adding a domain always issues a new value.

  1. Select DNS setup on the domain’s row, then Copy record value to copy the TXT value.
  2. Replace the TXT record’s value at your provider, and select Verify.

Quotes your provider puts around the value do no harm.

The traffic check looks up names under the domain, such as orders.mocks.example.com, so a CNAME on mocks.example.com itself, or on one project’s name, does not count. Create the wildcard record *.mocks.example.com pointing at the CNAME record target, and select Verify. No record on the domain’s own name is needed.

The wildcard has to lead to MockHub’s gateway: a CNAME to the CNAME record target, or an answer with the gateway’s own addresses, which is how providers that flatten CNAME records answer.

  • If dig prints another name or address, a different wildcard record is in place, such as an older A record for *.mocks.example.com. Replace it with the CNAME record.
  • If your provider can proxy records, as Cloudflare does, a proxied record answers with the proxy’s addresses and hides the gateway. Set the record to DNS only.

These messages can refuse a domain when you select Add domain:

Message What to do
Use a domain name such as api.example.com — no scheme, port or path. Enter the bare domain name, without a port
This domain is already registered It is already on your workspace’s list. Use the existing entry
This domain overlaps one that is already registered. Contact support if you control it. Another workspace has proven ownership of this name, a parent domain or a subdomain. Contact support if you control it. Pending claims in other workspaces do not block adding a domain
A public suffix cannot be registered. Register a domain under it instead. Use a domain you control under the suffix, such as example.co.uk. Shared suffixes such as co.uk and github.io cannot be custom domains
Names under "mockhub.dev" are reserved and cannot be registered. Names under MockHub’s own domains cannot be custom domains. Use your own domain
The domain must be a valid FQDN (e.g., example.com or api.example.com) The name is not one MockHub accepts, such as an IP address. Enter a domain name
You have reached the maximum number of custom domains (<n>) for your plan Remove a domain, or upgrade; see Plan limit

Adding or verifying a domain can refuse a competing ownership claim with this message:

Another workspace has proven ownership of this domain or one overlapping it. Contact support if you control it.

The first workspace to prove ownership reserves the name and overlapping names. Another workspace can finish verification while your DNS checks run, so publishing your TXT record does not guarantee the claim succeeds. Contact support if you control the domain.

A project on a verified domain answers at its subdomain, such as orders.mocks.example.com. If that name has a DNS record of its own, pointing elsewhere, it overrides the wildcard and the project never receives traffic; MockHub cannot detect this. Remove the record, or move the project to another subdomain. See Hostnames, domains and protocols.

A request that reaches MockHub for a domain that is not verified gets Project not found; see My request returns 404.

Report a problem with the domain name and the output of both dig commands.

Report a problem with this page