You may encounter this error: "The server could not comply with the request since it is either malformed or otherwise incorrect" when trying to add a subdomain to a project.
That may occur whenever your root domain is already being used in another project. This is a domain hijacking prevention setup that we have enabled in order to prevent malicious actors from misusing your domains. In our public documentation, you can find more detailed information about this.
To avoid this, you can add a TXT
DNS record to your DNS provider like:
_public-suffix-root.YOUR_DOMAIN TXT "public-suffix-root=YOUR_DOMAIN"
This adds your domain to the Platform.sh implementation of the Public Suffix List.
To limit what domains get protected, Platform.sh supports a small extension to the PSL. When you add a TXT
record for your domain, Platform.sh treats that domain as part of the PSL.
You may also have deleted the root domain from a project and want to use it in another project, after the deletion of this domain in the first project, try a redeploy of the environment containing the domain and retry adding the domain to the new target project.
If after trying this, the error persists, do not hesitate to open a support ticket.