# Unable to change my site's url using redirect rules

**URL:** <https://answers.netlify.com/t/unable-to-change-my-sites-url-using-redirect-rules/73526>\
**Category:** Support\
**Tags:** redirects\
**Created:** [August 15, 2022, 10:25pm UTC](https://answers.netlify.com/t/unable-to-change-my-sites-url-using-redirect-rules/73526 "2022-08-15T22:25:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MohamedElhefnawy](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@MohamedElhefnawy](https://answers.netlify.com/u/MohamedElhefnawy)\
**Post date:** [August 15, 2022, 10:25pm UTC](https://answers.netlify.com/t/unable-to-change-my-sites-url-using-redirect-rules/73526/1 "2022-08-15T22:25:11Z")

</div>

I’m trying to change my site’s url from authoritygenius.netlify.app to [authoritygenius.com/signup](http://authoritygenius.com/signup). ([www.authoritygenius.com](http://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](https://answers.netlify.com/t/setting-a-sub-directory-of-my-custom-domain-to-netlify-blog/21957)

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](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.

---

<div class="post-metadata">

**Author:** ![coelmay](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/coelmay/32/24427_2.png) [@coelmay](https://answers.netlify.com/u/coelmay)\
**Post date:** [August 15, 2022, 10:50pm UTC](https://answers.netlify.com/t/unable-to-change-my-sites-url-using-redirect-rules/73526/2 "2022-08-15T22:50:42Z")

</div>

Hi @MohamedElhefnawy

The file in the repository is incorrectly named as `_redirects.txt` instead of `_redirects` (no `.txt` extension.)

> **[Redirects and rewrites](https://docs.netlify.com/routing/redirects/)**
>
> Manage traffic to your site by defining redirect or rewrite rules in a \_redirects file or a netlify.toml file.

---

<div class="post-metadata">

**Author:** ![MohamedElhefnawy](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@MohamedElhefnawy](https://answers.netlify.com/u/MohamedElhefnawy)\
**Post date:** [August 16, 2022, 6:56pm UTC](https://answers.netlify.com/t/unable-to-change-my-sites-url-using-redirect-rules/73526/3 "2022-08-16T18:56:39Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![coelmay](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/coelmay/32/24427_2.png) [@coelmay](https://answers.netlify.com/u/coelmay)\
**Post date:** [August 16, 2022, 9:24pm UTC](https://answers.netlify.com/t/unable-to-change-my-sites-url-using-redirect-rules/73526/4 "2022-08-16T21:24:30Z")

</div>

> [@MohamedElhefnawy](#):
>
> says that deploy directory ‘AuthorityGenius-form-page/\_redirects’ is not a directory.

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. `https://`.)_
