I’m trying to change my site’s url from authoritygenius.netlify.app to authoritygenius.com/signup. (www.authoritygenius.com is my custom domain). I used the redirect rule given in this question on the forums:
Setting a sub directory of my custom domain to Netlify blog
Unfortunately I’m getting a problem when deploying my site with the _redirects file which is in my site’s src folder on github (linked below). It says: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘AuthorityGenius-form-page/_redirects’ versus ‘_redirects’ in the Netlify UI , And then it says: Failed during stage ‘building site’: Deploy directory ‘AuthorityGenius-form-page/_redirects’ does not exist.
Here is the folder with the redirect file in it: https://github.com/mohamedhefnawy1/credLabs-phase1/tree/main/AuthorityGenius-form-page
In my build settings I changed the publish directory to AuthorityGenius-form-page/_redirects as the documentation said.
Please let me know if there is any more information required or if you know where I’m messing up. Thank you for everything.
The file in the repository is incorrectly named as
_redirects.txt instead of
I see, I’ve changed the name of the file, but when I go to deploy my site it fails and shows me the following deploy log:
11:53:31 AM: Build ready to start
11:53:33 AM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
11:53:33 AM: build-image tag: v4.10.1
11:53:33 AM: buildbot version: aa4e1c51618610360476c8cb99b22ac3191f186e
11:53:33 AM: Fetching cached dependencies
11:53:33 AM: Starting to download cache of 153.1MB
11:53:33 AM: Finished downloading cache in 649.65555ms
11:53:33 AM: Starting to extract cache
11:53:34 AM: Finished extracting cache in 128.722308ms
11:53:34 AM: Finished fetching cache in 851.986682ms
11:53:34 AM: Starting to prepare the repo for build
11:53:34 AM: Preparing Git Reference refs/heads/main
11:53:34 AM: Parsing package.json dependencies
11:53:35 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘AuthorityGenius-form-page/_redirects’ versus ‘_redirects’ in the Netlify UI
11:53:35 AM: No build steps found, continuing to publishing
11:53:35 AM: Creating deploy upload records
11:53:35 AM: Failing build: Failed to build site
11:53:35 AM: Failed during stage ‘building site’: Deploy directory ‘AuthorityGenius-form-page/_redirects’ is not a directory
11:53:35 AM: Finished processing build request in 2.726657055s
I’m not sure why it fails during stage ‘building site’ and says that deploy directory ‘AuthorityGenius-form-page/_redirects’ is not a directory. Any help would be appreciated, Thanks
This is because
_redirects is a file, not a directory.
AuthorityGenius-form-page is a directory and the value you need to use for the publish path.
Do also note the syntax in
_redirects is incorrect as the URLs are missing missing a protocol (e.g.