October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk2 min

Create a .htaccess File in Hostinger: Exact Steps and File Location

Create a Hostinger .htaccess file in File Manager, place it in the right directory, and check whether your site type supports this file-based setup.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To create a site-wide .htaccess file in Hostinger, open Websites → Dashboard for the site, launch File Manager, open public_html, and create a new file named exactly .htaccess. Put it in a subfolder instead if its rules should apply only there. The file is optional, and this file-based method does not apply to AI Builder sites.

How to create the file in Hostinger File Manager

  1. Sign in to your hosting account and go to Websites → Dashboard for the website you want to change.

    As an Amazon Associate I earn from qualifying purchases.

  2. Open File Manager from the dashboard sidebar.

  3. Navigate to the directory where the rules should apply. For site-wide rules, use public_html, the site root identified in Hostinger’s creation instructions.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  4. Check whether .htaccess already exists in that directory. Hostinger’s File Manager displays dotfiles by default.

  5. If it is absent, choose New File, enter .htaccess with the leading dot, and click Create.

  6. Add only the configuration your site needs, then save the file. Creating the file does not require adding a generic set of rules.

Put the file in the directory that matches its scope

A file in public_html is the usual location for rules intended for the site as a whole. If a rule should affect only a particular subfolder or subdomain, place the file in the directory corresponding to that part of the site. Rules in the wrong directory may not apply to the content you intended to change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Hostinger’s guidance also uses directory-specific placement for configuration changes affecting subfolders or subdomains; see its instructions on changing the PHP version for subfolders or subdomains.

Check whether your site uses .htaccess

Hostinger describes .htaccess as supported but optional for its web, cloud, and agency hosting. Its guidance excludes AI Builder sites: they do not use this file-based setup. Confirm the type of site before following the steps as if they apply universally. See Hostinger’s .htaccess creation guide.

Hostinger says web and cloud hosting use LiteSpeed and that mod_rewrite is enabled by default on those plans. That context can make common rewrite rules relevant, but it does not mean every Apache directive is supported or appropriate for every account. Hostinger explains its file-transfer and server-access options.

If you cannot see an existing .htaccess file

The filename begins with a dot, so some FTP programs may hide it. In FileZilla, use Server → Force showing hidden files, then check the target directory again. Hostinger says its File Manager shows dotfiles by default. These visibility details are covered in its creation guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use application-specific rules, not a universal template

Creating an empty file is different from configuring it. The directives you add depend on the application and the behavior you want. For example, WordPress rewrite rules are a WordPress-specific configuration, not a required starter block for every website. Hostinger’s WordPress .htaccess instructions present those rules in that CMS context.

Before editing an existing configuration file, make a copy so you can restore it if a change causes errors. Hostinger also advises caution when changing system files; its File Editor instructions describe the editing workflow.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.