If you see the error "The hostname must end with 'www.yourdomain.com'" when adding a subdomain, this article explains why it happens and how to fix it.
Why this error occurs
Termly's scanner validates subdomains against the hostname registered as your Website URL. If your site is registered as https://www.example.com, the scanner expects any subdomain you add to end with www.example.com.
This means a subdomain like shop.example.com will fail validation because it ends with example.com, not www.example.com.
Error shown when the registered URL includes www, subdomains fail validation because they don't match the expected suffix.
How to fix it
Update your Website URL to use the naked domain (without www). This allows all subdomains to pass validation.
- Log in to your Termly Dashboard.
- Go to Settings → Website Information.
- Update the Website URL from
https://www.example.comtohttps://example.com. - Save your changes.
- Return to the scanner and re-enter your subdomain, it should now pass validation.