Deploying to Microsoft Internet Information Server (IIS)
Deploying to Microsoft IIS is mostly copy & paste.
gatsby build copy the contents of the
public folder into the
wwwroot folder of your IIS web.
One important and sometimes overlooked aspect is to configure caching correctly. The following configuration will give you a good starting point in line with Gatsby’s suggested approach to caching.
Install the IIS URL Rewrite module if it’s not already there.
It’s required to define the
outboundRules in the
web.config given below.
web.config file to the
static folder inside your Gatsby solution. It will be copied unchanged to the
Please note that local settings you make for your web in IIS Manager change the
you have to be careful to copy any changes to
web.config on your server back to the version in your Gatsby