Because Kinsta uses the newer Nginx web server instead of Apache, WordPress sites hosted at Kinsta do not have a .htaccess file. Instead, you can use tools in MyKinsta to replicate much of the important .htaccess functionality like redirects and IP bans.

For other rules, Nginx also offers its own configuration file where similar rules can be set up, though the syntax is different. Our Support team can help you add additional rules as needed to this Nginx configuration file (the equivalent of Apache’s .htaccess file).

Set Up Redirects

To create redirects for your site hosted at Kinsta, you can use the Redirects tool in your MyKinsta dashboard:

Add a redirect rule in MyKinsta.
Add a redirect rule in MyKinsta.

Block Specific IP Addresses

To stop specific IP addresses from accessing your site at Kinsta, you can use the IP Deny tool in MyKinsta.

Add an IP address to deny in MyKinsta.
Add an IP address to deny in MyKinsta.

Password Protect Your Site

To lock down your entire site, you can use our password protection (htpasswd) tool in MyKinsta. You can find it under the Tools section on your site. Click Enable, choose a username and password, and you’re good to go!

Enable password protection in MyKinsta.
Enable password protection in MyKinsta.

After it’s enabled, your WordPress site will then require authentication to access it. You can change the credentials at any time or disable it when you no longer need it.

Password protection requires signing in before viewing the site in your browser.
Password protection requires signing in before viewing the site in your browser.

Other Rules? Contact Our Support Team

Using the Nginx configuration file, it’s also possible to add other configuration rules – like password protecting a folder at the server level or disabling image hotlinking.

By default, you cannot edit the Nginx configuration file yourself at Kinsta. However, if you reach out to our Support team, they’ll be happy to help you and add the relevant rule for you. Note: They cannot convert .htaccess to Nginx rules for you.