Web.config File Placement

I have a web.config file with a variety of redirect rules setup. This is currently placed in the root of my website so that mydomain.com/rule works for the various rules I have setup. I was wondering where and how I should place this file.

Is the directory I select for publishing my root directory in this case and would apply those rules for mydomain.com/rules?

Do I manually place that file in the directory or will it be deleted every time I publish?

Thoughts?

We use a similar setup for some of our customers.
You should place the Web.config in the root directory of your web site.
Good news: Publishing won’t delete this file

You may need to do other things to configure IIS to read the web.config and serve the site correctly, but that’s really beyond the scope of this forum!