Cypress Tests - Fails - Incorrect URL | Community
Skip to main content
NageshRaja
Level 5
November 3, 2025
Solved

Cypress Tests - Fails - Incorrect URL

  • November 3, 2025
  • 2 replies
  • 277 views

Hey folks,

 

I have an absurd issue on my custom ui testing build - 

The logs are building out the URL https://publish-p111111-e1492222.adobeaemcloud.net/hello/test/hi?nocache=true

The actual URL should be adobeaemcloud.com and not .net

I have set the URL in environment variable and in my cypress.config.js but yet the above one gets logged.

 

The above URL gives Apache standard response It works and thereby fails my custom tests.

cy:request ✔ [object Object]
Status: 200
Response body: <html><body><h1>It works!</h1></body></html>
cy:command ✔ STEP HTTP Status: 200

 

 

Anyone knows why that is?

 

Thanks,

Nagesh

Best answer by ManviSharma

Hello @nageshraja ,

 

This issue occurs because your tests are resolving or sending requests to the raw publish instance domain (.adobeaemcloud.net) instead of your intended custom domain (.adobeaemcloud.com).

Even though you’ve set the correct URL in environment variables and cypress.config.js, the .net URL indicates that either:

  • The baseUrl or cy.request() in Cypress is not correctly picking up the env variable, or

  • The Host header is being overridden/downstream by CDN or dispatcher configuration.

When the request hits the raw publish domain, it serves the default Apache “It works!” page , hence the 200 status but failed test.

> As a fix:
----------------------------------------------------
> Verify your cypress.config.js uses:

baseUrl: process.env.TEST_BASE_URL || 'https://adobeaemcloud.com'

  • Ensure tests use relative URLs (cy.visit('/') or cy.request('/')) and not absolute .net links.

  • If needed, force the Host header for debugging:

    cy.request({ url: 'https://publish-p...net/hello/test/hi', headers: { Host: 'adobeaemcloud.com' } })

    This will confirm whether the issue lies in Cypress config or host header forwarding.







 

2 replies

ManviSharma
Adobe Employee
ManviSharmaAdobe EmployeeAccepted solution
Adobe Employee
November 3, 2025

Hello @nageshraja ,

 

This issue occurs because your tests are resolving or sending requests to the raw publish instance domain (.adobeaemcloud.net) instead of your intended custom domain (.adobeaemcloud.com).

Even though you’ve set the correct URL in environment variables and cypress.config.js, the .net URL indicates that either:

  • The baseUrl or cy.request() in Cypress is not correctly picking up the env variable, or

  • The Host header is being overridden/downstream by CDN or dispatcher configuration.

When the request hits the raw publish domain, it serves the default Apache “It works!” page , hence the 200 status but failed test.

> As a fix:
----------------------------------------------------
> Verify your cypress.config.js uses:

baseUrl: process.env.TEST_BASE_URL || 'https://adobeaemcloud.com'

  • Ensure tests use relative URLs (cy.visit('/') or cy.request('/')) and not absolute .net links.

  • If needed, force the Host header for debugging:

    cy.request({ url: 'https://publish-p...net/hello/test/hi', headers: { Host: 'adobeaemcloud.com' } })

    This will confirm whether the issue lies in Cypress config or host header forwarding.







 

NageshRaja
Level 5
November 7, 2025

Hi @manvisharma,

I used the below config to get around .net to .com switch - 

const publishURL = (process.env.AEM_PUBLISH_URL &&
process.env.AEM_PUBLISH_URL.includes('.net'))
? process.env.AEM_PUBLISH_URL.replace('.net', '.com')
: (process.env.AEM_PUBLISH_URL || 'https://publish-p11111-e1492222.adobeaemcloud.com');

 This worked but why the publish url picked up ".net" is something I am not sure about.

ManviSharma
Adobe Employee
Adobe Employee
November 7, 2025

Hello @nageshraja ,

 

Adobe runs two “shapes” of environment hostnames:

  • Public, end-user hosts: *.adobeaemcloud.com (what you want)

  • Internal/legacy service hosts: *.adobeaemcloud.net 

So if AEM_PUBLISH_URL came from Cloud Manager env vars, a pipeline script, the local SDK, it may still be the .net form. Your replacement works because there are no public .net publish hosts only .com.

muskaanchandwani
Adobe Employee
Adobe Employee
November 4, 2025

Hello @nageshraja 


The .net domain shown in the logs is Adobe's internal implementation and doesn’t reflect the actual public endpoint.

Please ensure the UI testing proxy is configured per the Documentation below - that should resolve the incorrect URL issue :

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/using-cloud-manager/test-results/functional-testing/ui-testing#set-up-http-proxy