{"id":7867,"date":"2026-02-09T08:56:03","date_gmt":"2026-02-09T08:56:03","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=7867"},"modified":"2026-03-27T03:24:49","modified_gmt":"2026-03-27T03:24:49","slug":"htaccess-files-in-agency-hosting","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/htaccess-files-in-agency-hosting\/","title":{"rendered":".htaccess files in Agency Hosting"},"content":{"rendered":"<p><span style=\"font-weight: 400\">Agency Hosting uses Nginx web server architecture<\/span><span style=\"font-weight: 400\">. The good news is Hostinger&rsquo;s Agency Hosting now supports <code>.htaccess<\/code> files. You can create or edit <code>.htaccess<\/code> directly via File Manager or SSH, and your configurations will take effect on the server.&nbsp;<\/span><\/p><p><span style=\"font-weight: 400\">Everything you did with <\/span><strong>.htaccess<\/strong><span style=\"font-weight: 400\"> can also be accomplished through our hPanel. You can manage common configurations through hPanel as an alternative to <code>.htaccess.<\/code><\/span><\/p><h2 id=\"h-common-htaccess-tasks-agency-hosting-alternatives\"><b>Common .htaccess tasks &amp; Agency hosting alternatives<\/b><\/h2><h3><b>1. URL Redirects<\/b><\/h3><p><b>Old way (.htaccess)<\/b><span style=\"font-weight: 400\">:<\/span><\/p><p><span style=\"font-weight: 400\"><code>Redirect 301 \/old-page.html \/new-page.html<\/code><\/span><\/p><p><span style=\"font-weight: 400\"><code>RewriteRule ^old-category\/(.*)$ \/new-category\/$1 [R=301,L]<\/code><\/span><\/p><p><b>Agency hosting way<\/b><span style=\"font-weight: 400\">:<\/span><\/p><p><span style=\"font-weight: 400\">Use the <\/span><b>Redirects<\/b><span style=\"font-weight: 400\"> feature in your control panel:<\/span><\/p><ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Navigate to your website settings<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Go to <\/span><b>Domains &ndash; Redirects<\/b><span style=\"font-weight: 400\"> section inside your website dashboard<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select the URL path you want to redirect from and to:<\/span><\/li>\n<\/ol><p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7868 size-full\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/redirect.png\" alt=\"\" width=\"1980\" height=\"976\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/redirect.png 1980w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/redirect-300x148.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/redirect-1024x505.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/redirect-768x379.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/redirect-1536x757.png 1536w\" sizes=\"auto, (max-width: 1980px) 100vw, 1980px\" \/><\/p><h3><b>2. IP Blocking &amp; Access Control<\/b><\/h3><p><b>Old way (.htaccess)<\/b><span style=\"font-weight: 400\">:<\/span><\/p><p><span style=\"font-weight: 400\"><code>Order Deny,Allow<\/code><\/span><\/p><p><span style=\"font-weight: 400\"><code>Deny from 192.168.1.100<\/code><\/span><\/p><p><span style=\"font-weight: 400\"><code>Allow from all<\/code><\/span><\/p><p><b>Agency hosting way<\/b><span style=\"font-weight: 400\">:<\/span><\/p><p><span style=\"font-weight: 400\">Use the <\/span><b>IP Blacklist <\/b><span style=\"font-weight: 400\">feature:<\/span><\/p><ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Go to <\/span><b>Security<\/b><span style=\"font-weight: 400\"> section in your website dashboard<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><b>IP Blackslist<\/b><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Add IP addresses to block<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Save changes<\/span><\/li>\n<\/ol><p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7869 size-full\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/ip-blacklist.png\" alt=\"\" width=\"2000\" height=\"362\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/ip-blacklist.png 2000w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/ip-blacklist-300x54.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/ip-blacklist-1024x185.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/ip-blacklist-768x139.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/ip-blacklist-1536x278.png 1536w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/p><h3><b>3. Force HTTPS<\/b><\/h3><p><b>Old way (.htaccess)<\/b><span style=\"font-weight: 400\">:<\/span><\/p><p><span style=\"font-weight: 400\"><code>RewriteEngine On<\/code><\/span><\/p><p><span style=\"font-weight: 400\"><code>RewriteCond %{HTTPS} off<\/code><\/span><\/p><p><span style=\"font-weight: 400\"><code>RewriteRule ^(.*)$ https:\/\/%{HTTP_HOST}\/$1 [R=301,L]<\/code><\/span><\/p><p><b>Agency hosting way<\/b><span style=\"font-weight: 400\">:<\/span><\/p><p><span style=\"font-weight: 400\">SSLs are installed automatically. But if you want to install a Custom SSL, you can do that by following these steps<\/span><\/p><ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Go to <\/span><b>Security<\/b><span style=\"font-weight: 400\"> section in your website dashboard<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><b>SSL<\/b><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click &ldquo;Manage&rdquo; and &ldquo;Install custom SSL&rdquo;<br>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7870 size-full\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/custom-ssl.png\" alt=\"\" width=\"1968\" height=\"632\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/custom-ssl.png 1968w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/custom-ssl-300x96.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/custom-ssl-1024x329.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/custom-ssl-768x247.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/custom-ssl-1536x493.png 1536w\" sizes=\"auto, (max-width: 1968px) 100vw, 1968px\" \/><br>\n<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Follow instructions shown in the modal<br>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7871 size-full\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/custom-ssl-2.png\" alt=\"\" width=\"1176\" height=\"1280\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/custom-ssl-2.png 1176w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/custom-ssl-2-276x300.png 276w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/custom-ssl-2-941x1024.png 941w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/02\/custom-ssl-2-768x836.png 768w\" sizes=\"auto, (max-width: 1176px) 100vw, 1176px\" \/><br>\n<\/span><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Agency Hosting uses Nginx web server architecture. The good news is Hostinger&rsquo;s Agency Hosting now supports .htaccess files. You can create or edit .htaccess directly&#8230;<\/p>\n","protected":false},"author":596,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[294],"tags":[],"class_list":["post-7867","post","type-post","status-publish","format-standard","hentry","category-agency-hosting-plans"],"hreflangs":[],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/7867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=7867"}],"version-history":[{"count":5,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/7867\/revisions"}],"predecessor-version":[{"id":9140,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/7867\/revisions\/9140"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=7867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=7867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=7867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}