{"id":4273,"date":"2026-04-07T15:35:18","date_gmt":"2026-04-07T13:35:18","guid":{"rendered":"https:\/\/www.combell.nl\/en\/help\/?post_type=ht_kb&#038;p=4273"},"modified":"2026-04-08T10:03:01","modified_gmt":"2026-04-08T08:03:01","slug":"working-with-the-htaccess-file","status":"publish","type":"ht_kb","link":"https:\/\/www.combell.nl\/en\/help\/kb\/working-with-the-htaccess-file\/","title":{"rendered":"Working with the .htaccess file"},"content":{"rendered":"\n<p>The <em>.htaccess<\/em> file is a configuration file that allows you to modify the behavior of your website at server level. For example, you can use it for redirects, security rules, or caching settings.<\/p>\n\n\n\n<div class=\"wp-block-ht-block-toc  is-style-outline htoc htoc--position-wide toc-list-style-plain\" data-htoc-state=\"expanded\"><span class=\"htoc__title\"><span class=\"ht_toc_title\">Table of Contents<\/span><span class=\"htoc__toggle\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\"><g fill=\"#444\"><path d=\"M15 7H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z\"><\/path><path d=\"M15 1H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1zM15 13H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z\"><\/path><\/g><\/svg><\/span><\/span><div class=\"htoc__itemswrap\"><ul class=\"ht_toc_list\"><li class=\"\"><a href=\"#htoc-which-hosting-packages-does-this-apply-to\">Which hosting packages does this apply to?<\/a><\/li><li class=\"\"><a href=\"#htoc-what-can-you-do-with-a-htaccess-file\">What can you do with a .htaccess file?<\/a><\/li><li class=\"\"><a href=\"#htoc-where-can-you-find-the-htaccess-file\">Where can you find the .htaccess file?<\/a><\/li><\/ul><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-which-hosting-packages-does-this-apply-to\">Which hosting packages does this apply to?<\/h2>\n\n\n\n<p>Our classic web hosting packages run on Apache web servers.<br>This means you can use a <em>.htaccess<\/em> file and add your own rules, as long as the syntax is correct for Apache.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Are you using Managed WordPress or Managed WooCommerce?<br><\/strong>Then you cannot modify the <em>.htaccess<\/em> file yourself, as the server configuration is fully managed by us.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-what-can-you-do-with-a-htaccess-file\">What can you do with a .htaccess file?<\/h2>\n\n\n\n<p>With a <em>.htaccess<\/em> file, you can for example:<\/p>\n\n\n\n<ul>\n<li>Set up URL redirects (e.g. from HTTP to HTTPS)<\/li>\n\n\n\n<li>Restrict access to certain files or folders<\/li>\n\n\n\n<li>Block or allow specific IP addresses<\/li>\n\n\n\n<li>Configure caching and compression<\/li>\n\n\n\n<li>Customize error pages<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"htoc-more-documentation-about-the-htaccess-file\">More documentation about the .htaccess file<\/h3>\n\n\n\n<p>Apache provides extensive documentation on the use of .htaccess files.<br>Please note that this documentation can be quite technical:<\/p>\n\n\n\n<p><a href=\"https:\/\/httpd.apache.org\/docs\/current\/howto\/htaccess.html\" target=\"_blank\" rel=\"noopener\">https:\/\/httpd.apache.org\/docs\/current\/howto\/htaccess.html<\/a><\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\"><strong>Always create a backup before making any changes<br><\/strong>Changes to the .htaccess file are applied immediately. An error may cause your website to stop working properly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-where-can-you-find-the-htaccess-file\">Where can you find the .htaccess file?<\/h2>\n\n\n\n<p>The <em>.htaccess<\/em> file is located in the <strong>\/www <\/strong>folder of your hosting.<br>Do you have subsites? Then you can find the file via the <strong>\/subsites<\/strong> folder, inside the folder of your subsite.<\/p>\n\n\n\n<p>You can access this file via <a href=\"https:\/\/www.combell.nl\/en\/help\/kb\/upload-your-website-via-ftp\/\" data-type=\"ht_kb\" data-id=\"7321\">FTP<\/a> or through the <a href=\"https:\/\/www.combell.nl\/en\/help\/kb\/manage-your-website-files-using-file-manager\/\" data-type=\"ht_kb\" data-id=\"20883\">file manager<\/a> in your control panel.<\/p>\n\n\n\n<p><strong>Via FTP:<\/strong><\/p>\n\n\n\n<ul>\n<li>Connect to your hosting using an FTP program (such as FileZilla)<\/li>\n\n\n\n<li>Navigate to the <strong>\/www<\/strong> directory<\/li>\n\n\n\n<li>There you will find the <em>.htaccess<\/em> file<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\"><strong>Can\u2019t see the <em>.htaccess<\/em> file?<br><\/strong>It may be hidden. Make sure you enable the <strong>\u201cshow hidden files\u201d<\/strong> option in your FTP program. <a href=\"https:\/\/www.combell.nl\/en\/help\/kb\/why-cant-i-see-the-htaccess-file-in-my-ftp-client\/\" data-type=\"ht_kb\" data-id=\"3835\">Read more<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The .htaccess file is a configuration file that allows you to modify the behavior of your website at server level. For example, you can use it for redirects, security rules, or caching settings. Which hosting packages does this apply to? Our classic web hosting packages run on Apache web servers.This&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[52,16],"ht-kb-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/4273"}],"collection":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/comments?post=4273"}],"version-history":[{"count":4,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/4273\/revisions"}],"predecessor-version":[{"id":4283,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/4273\/revisions\/4283"}],"wp:attachment":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/media?parent=4273"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb-category?post=4273"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb-tag?post=4273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}