# Redirected to InfinityFree 403 Forbidden page

**URL:** <https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664>\
**Category:** Websites and PHP\
**Created:** [March 2, 2022, 11:43am UTC](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664 "2022-03-02T11:43:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)\
**Post date:** [March 2, 2022, 11:43am UTC](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664/1 "2022-03-02T11:43:51Z")

</div>

Getting a 403 error means the server is refusing to show your webpage. Here are the most common causes and how to fix them:

## 1. Website Files Are in the Wrong Location

**The Issue:** Your domain might be pointing to an empty or non-existent folder.

**How to Check:**

1. Log into your [InfinityFree client area](https://dash.infinityfree.com)
2. Go to Accounts → [Select your account] → Domains → [Find your domain] → Manage
3. Find the Directory Status card, and look at the Directory displayed there

**Understanding the folder structure:**

- Your first domain uses the `htdocs` folder
- Additional domains get their own folders (e.g., `example.com/htdocs`)
- If you delete and re-add your original domain, it will be treated as an additional domain and get a new folder

**How to Fix:** Upload your website files to the exact folder shown in your client area. If the folder is empty or missing, that’s why you’re seeing the 403 error.

## 2. Missing Index File

**The Issue:** When someone visits your site (like `http://example.com/` or `http://example.com/blog/`), the server looks for a default file to display. If it can’t find one, you get a 403 error.

**What the server looks for:**  
The server searches for these files in this exact order:

1. `index.php`
2. `index.html`
3. `index.htm`
4. `index2.html`

**Important notes:**

- File names are **case-sensitive** - `Index.php` or `index.HTML` won’t work
- The server only looks in the specific folder being accessed, not subfolders

**How to Fix (choose one):**

**Option 1 (Recommended):** Create an index file

- Add an `index.html` or `index.php` file to your main folder
- This file will be shown when people visit your site

**Option 2:** Show a file listing

- Create a file called `.htaccess` in the folder
- Add this line: `Options +Indexes`
- Visitors will see a list of files instead of your webpage

**Option 3:** Set a custom default file

- Create a file called `.htaccess` in the folder
- Add this line: `DirectoryIndex yourfile.html index.php index.html index.htm`
- Replace `yourfile.html` with your actual filename

## 3. Blocked Keywords in Your URL

**The Issue:** Certain keywords in your URL are automatically blocked by InfinityFree.

**Blocked keywords and why:**

**“chat”** - Live chat scripts constantly refresh pages, creating excessive server load

- Examples: `chat.php`, `/livechat/`, `/support/chat/`

**“includes”** - This folder typically contains scripts meant to be loaded by other PHP files, not accessed directly by browsers (security measure)

- Examples: `/includes/functions.php`, `/includes/config.php`

**How to Fix:**  
Rename your files or folders to something else:

- For chat: `talk`, `messages`, `contact`, `support`
- For includes: `pages`, `functions`, `scripts`.

**Important:** Even if you rename chat-related files, hosting live chat scripts is still prohibited.

## 4. Your IP Address Is Blocked

**The Issue:** Your website’s `.htaccess` file might be blocking your own IP address.

**How to Check:**

1. Access your website files via file manager or FTP
2. Look for a file named `.htaccess` in your website folder
3. Open the file and look for lines starting with `deny from` or `allow from`

**How to Fix:**

**If you don’t want IP restrictions:**

- Remove all lines starting with `deny from` or `allow from`

**If you see `allow from all`:**

- Look for lines like `deny from [your IP address]` and delete them

**If you see `deny from all`:**

- Add a new line: `allow from [your IP address]`
- You can find your IP address by searching “what is my IP” in Google

* * *

**Still having trouble?** Double-check that your files are in the exact folder path shown in your InfinityFree client area under Domains. Most 403 errors are caused by files being in the wrong location.

---

<div class="post-metadata">

**Author:** ![Thewebuser22](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/thewebuser22/32/25592_2.png) [@Thewebuser22](https://forum.infinityfree.com/u/Thewebuser22)\
**Post date:** [March 2, 2022, 8:10pm UTC](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664/2 "2022-03-02T20:10:16Z")

</div>

I should ask to clarify, and I hope that other people have this question as well to prevent my question from being self-centered:

Why do you block folders containing the words include/require? Is this for the safety regarding people who do not understand this principle well (the principle of include/require), preventing them from accidentally harming their website?

Or is there another reason behind blocking these folders that might otherwise cause problems to people or their website (or Infinityfree)?

---

<div class="post-metadata">

**Author:** ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)\
**Post date:** [March 3, 2022, 12:46pm UTC](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664/3 "2022-03-03T12:46:05Z")

</div>

> [@Thewebuser22](#):
>
> Why do you block folders containing the words include/require? Is this for the safety regarding people who do not understand this principle well (the principle of include/require), preventing them from accidentally harming their website?
> 
> Or is there another reason behind blocking these folders that might otherwise cause problems to people or their website (or Infinityfree)?

Good question, but one I omitted for a reason.

The reason is that _I_ didn’t block these URLs, but iFastNet did. And I don’t _know_ for sure when or why they did this.

My _guess_, based on my experience with iFastNet and how they approach things, is that there was a security problem in some popular script or CMS which placed some shared code in the `includes` folder, which had security problems if these scripts were accessed directly. Like exposing sensitive data, or be used for spam. And to prevent this from being abused, the decision was made to block access to the files and folders that enabled these attacks.

But I didn’t include it in the article because it’s completely unverified.

---

<div class="post-metadata">

**Author:** ![ShazamBolt8](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/shazambolt8/32/29637_2.png) [@ShazamBolt8](https://forum.infinityfree.com/u/ShazamBolt8)\
**Post date:** [November 27, 2022, 3:55pm UTC](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664/4 "2022-11-27T15:55:18Z")

</div>

You may also want to add that `errors` folder is also prohibited.

---

<div class="post-metadata">

**Author:** ![Greenreader9](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/greenreader9/32/22847_2.png) [@Greenreader9](https://forum.infinityfree.com/u/Greenreader9)\
**Post date:** [November 27, 2022, 4:20pm UTC](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664/5 "2022-11-27T16:20:32Z")

</div>

The “errors” folder does not lead to a 403 error though, so it does not belong in this article.

---

<div class="post-metadata">

**Author:** ![YT\_Xaos](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/yt_xaos/32/45201_2.png) [@YT\_Xaos](https://forum.infinityfree.com/u/YT_Xaos)\
**Post date:** [February 5, 2024, 11:39pm UTC](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664/6 "2024-02-05T23:39:10Z")

</div>

A post was split to a new topic: [Verifying website on Yandex and Firefox leads to error 403](https://forum.infinityfree.com/t/verifying-website-on-yandex-and-firefox-leads-to-error-403/89597)

---

<div class="post-metadata">

**Author:** ![Fishbite](https://forum.infinityfree.com/letter_avatar/fishbite/32/5_5575768a8748004e209b776fc1b2916d.png) [@Fishbite](https://forum.infinityfree.com/u/Fishbite)\
**Post date:** [October 28, 2024, 7:51pm UTC](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664/7 "2024-10-28T19:51:14Z")

</div>

I just noticed that the block on files within the ‘includes’ folder is not working, or at least not how I expected it to work.

> **The includes folder**  
> For security reasons, all files in a folder `includes` are blocked

I have a folder named `includes` in the `htdocs` folder. If I try to accesss the folder itself by typing `devnotes.rf.gd/includes` the server responds with a _ **403 forbidden** _ message which is what I expected, however, if I type `devnotes.rf.gd/includes/footer.php` the browser renders:

> page footer © Fishbite

FYI, the content of the footer.php file is simply:

```auto
    <footer><p>page footer &copy; Fishbite <?= $year ?></p></footer>
</body>
</html>

```

I expected to see the a _ **403 forbidden** _ message again when I tried to access this footer.php file directly, or am I misunderstanding something?

---

<div class="post-metadata">

**Author:** ![Greenreader9](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/greenreader9/32/22847_2.png) [@Greenreader9](https://forum.infinityfree.com/u/Greenreader9)\
**Post date:** [October 28, 2024, 8:54pm UTC](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664/8 "2024-10-28T20:54:37Z")

</div>

That is intentional. “includes” is a reserved system name.

---

<div class="post-metadata">

**Author:** ![YT\_Xaos](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/yt_xaos/32/45201_2.png) [@YT\_Xaos](https://forum.infinityfree.com/u/YT_Xaos)\
**Post date:** [October 28, 2024, 10:15pm UTC](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664/9 "2024-10-28T22:15:28Z")

</div>

I don’t think that is what they meant. Fishbite understands that accessing inside of the “includes” directory directly through the browser leads to a 403 Forbidden error (or at least should):

> [@Fishbite](#):
>
> I expected to see the a _ **403 forbidden** _ message

> [@Fishbite](#):
>
> `devnotes.rf.gd/includes` the server responds with a _ **403 forbidden** _ message which is what I expected

However, they see

> [@Fishbite](#):
>
> page footer © Fishbite

Instead of a 403 Forbidden. And oddly enough, I see it too:

 ![image](https://forum-cdn.infinityfree.net/original/3X/4/5/45df31f420a0ff22e52cbb0ecbae64f7b1626095.png)  
I tested it on my website, and sure enough, I got the same result:  
 ![image](https://forum-cdn.infinityfree.net/original/3X/d/c/dc438bacc3a6a294222275e0b079572c6b1c92a9.png)

---

<div class="post-metadata">

**Author:** ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)\
**Post date:** [October 30, 2024, 8:59pm UTC](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664/10 "2024-10-30T20:59:26Z")

</div>

Interesting finding indeed! Directly accessing `devnotes.rf.gd/includes` is expected if the directory doesn’t have an index file, which I assume it doesn’t have. But accessing _any_ files in that directory used to not work.

It’s entirely possible that this was changed somehow. Maybe because the filters broke, maybe because they were no longer deemed relevant, or maybe because they have been tightened to only block specific paths within the includes folder to prevent issues to legitimate use cases.

Time will tell if we’ll ever get any support requests where this might play up.

* * *

And for people who were relying on the includes folder blocking direct access to their files, you can still replicate the old behavior by going to the `includes` directory, create a new file with the name `.htaccess`, and put the line `Require all denied` in it.
