E: Error verifying routes.yaml error during Staging or Production deploy
This article provides a solution for the Adobe Commerce on cloud infrastructure issue, where you get the “E: Error while verifying routes.yaml” error message when trying to deploy the project to the Staging or Production environment.
Affected versions
- Adobe Commerce on cloud infrastructure, all versions
Issue
Steps to reproduce:
Trigger a deploy by pushing the code to the Staging or Production environment.
Expected behavior:
Deployment is successful.
Actual behavior:
The deployment is blocked and the following error message is displayed in the log:
Deploying applications Verifying configuration E: Error while verifying routes.yaml.
The following domains are configured for your cluster, but have no routes defined in your routes.yaml file:
- store1.example.com
- store2.example.com
- test-store.example.com
With your current routes.yaml configuration,
these domains would NOT be served!
In order to continue, please see here for instructions to troubleshoot:
/help/troubleshooting/deployment/e-error-verifying-routes-yaml-error-during-staging-or-production-deploy.md
Cause
This error occurs if the route configuration for any additional domains that have been added to your project are missing from the routes.yaml
file.
As part of the Adobe Commerce self-service enablement upgrade for self-service route configuration, we added a pre-deployment check to ensure that all domains in your project have routes configured in the routes.yaml
file. If any domains are missing route configuration, the deployment gets blocked.
Solution
To resolve the blocked deployment, update the routes.yaml
file to configure routes for the domains listed in the error message by using either of the following methods:
- Apply the patch supplied by Adobe Commerce during the upgrade process.
- Manually add the missing route configuration to the
routes.yaml
file.
Method 1: Apply the patch supplied by Adobe Commerce
- Look for a recent Adobe Commerce support ticket with the title "Enable self service features for <project_ID>".
- Follow the instructions in the ticket to apply the patch, which updates the route configuration for your cloud environment.
- Сommit and push the changes to redeploy your project.
Method 2: Manually add the missing route configuration
-
To serve all domains in your project using the same route configuration, update the
routes.yaml
file adding route templates for the default domain and all other domains on your project as shown in the following example:code language-yaml "http://{default}/": type: upstream upstream: "mymagento:http" "http://{all}/": type: upstream upstream: "mymagento:http"
-
Сommit and push your changes to redeploy your project.
For detailed instructions to update the route configuration, see Cloud for Adobe Commerce > Configure routes in our developer documentation.
routes.yaml
file to remove any references to the obsolete domains.