Netlify serving wrong site from repo with two websites

I’ve got two sites (phpscraper and phpscraper-testpages) deployed from the same repo. It seems Netlify serves only one under both DNS entries.

Example of a page that doesn’t work: Links with different bases (src: PHPScraper/base-href.html at master · spekulatius/PHPScraper · GitHub). For the pages in question a 404 page of the other site is served.

Any suggestions on where to check for the problem?

Hey @spekulatius12345

Have you set the base directory or publish directory for the second site (or both sites)?

Hey @coelmay,

The publish directory is set for both differently. The one site is on websites/ and the second (broken one) is on websites/test-pages.


Can you share a screenshot of the build settings for both sites?

Sure, here is the main site:

… and the test pages:

I’ve managed to resolve it by removing an entry from the netlify.toml (which I assumed is only used while setup of the repo): Test pages by spekulatius · Pull Request #91 · spekulatius/PHPScraper · GitHub

Thanks for coming back and sharing this solution with us! This will definitely help future forums members who encounter the same obstacle!

1 Like