# Hosting denied access

**URL:** <https://forum.infinityfree.com/t/hosting-denied-access/120597>\
**Category:** Hosting Support\
**Created:** [September 12, 2026, 8:40am UTC](https://forum.infinityfree.com/t/hosting-denied-access/120597 "2026-09-12T08:40:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NguyenDucTrung](https://forum.infinityfree.com/letter_avatar/nguyenductrung/32/6_22734026db12803ebb3e059622ac3534.png) [@NguyenDucTrung](https://forum.infinityfree.com/u/NguyenDucTrung)\
**Post date:** [September 12, 2026, 8:40am UTC](https://forum.infinityfree.com/t/hosting-denied-access/120597/1 "2026-09-12T08:40:15Z")

</div>

### Website URL

[https://quanlykhodanpianonguyenduy.gt.tc/](https://quanlykhodanpianonguyenduy.gt.tc/)

### Error Message

**Title: api\_chat.php returns 403 while another PHP file with identical content works**

Hello InfinityFree community,

My website is [quanlykhodanpianonguyenduy.gt.tc](https://quanlykhodanpianonguyenduy.gt.tc/).

My PHP chatbot works on localhost, but on InfinityFree, requests to `/api_chat.php` return HTTP 302 and redirect to `https://errors.infinityfree.net/errors/403/`, which returns 403 Forbidden.

**What I have tested:**

- Created `/kiemtra.php` in `/htdocs`. It displays “PHP hoạt động” successfully.
- Replaced the entire contents of `/api_chat.php` with the same minimal code:

```php
<?php
header('Content-Type: text/plain; charset=utf-8');
echo 'PHP hoạt động';

```

- `/api_chat.php` still returns 403 when opened directly, while `/kiemtra.php` works.
- Deleted and recreated `api_chat.php` using File Manager, but the issue remains.
- Both files are in `/htdocs`, and the filename is exactly `api_chat.php`.
- The parent `.htaccess` I checked only contains `DirectoryIndex` and `ErrorDocument` directives. I have left it unchanged.
- I could not find a way to change file permissions in File Manager.

The minimal test contains no database connection or external API calls.

Could you please help me determine whether this is caused by file permissions, a path-specific restriction, or another hosting configuration issue? What should I check next?

Thank you!

---

<div class="post-metadata">

**Author:** ![dan3008](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/dan3008/32/68577_2.png) [@dan3008](https://forum.infinityfree.com/u/dan3008)\
**Post date:** [September 12, 2026, 9:03am UTC](https://forum.infinityfree.com/t/hosting-denied-access/120597/2 "2026-09-12T09:03:37Z")

</div>

> [@NguyenDucTrung](#):
>
> api\_chat.php returns 403

This link should help:

> [@Redirected to InfinityFree 403 Forbidden page](https://forum.infinityfree.com/t/redirected-to-infinityfree-403-forbidden-page/58664):
>
> 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: Log into your [InfinityFree client area](https://dash.infinityfree.com) Go to Accounts → [Select your account] → Domains → [Find your domain] → Manage Find the Directory Status card, and look at the Directory displayed there Understanding the folder structure: Your fi…

But to summarise, because both API’s and live chat systems can’t be hosted here (you can host it else where, and embed it here, it just cant run on InfinityFree servers) certain key words, including “Chat” automatically redirect to a 403 page.

The other thing that might cause you a problem with your project, is that the security system will block any none-browser connections going to your site. Since InfinityFree is for hosting websites not API’s

---

<div class="post-metadata">

**Author:** ![NguyenDucTrung](https://forum.infinityfree.com/letter_avatar/nguyenductrung/32/6_22734026db12803ebb3e059622ac3534.png) [@NguyenDucTrung](https://forum.infinityfree.com/u/NguyenDucTrung)\
**Post date:** [September 12, 2026, 9:45am UTC](https://forum.infinityfree.com/t/hosting-denied-access/120597/3 "2026-09-12T09:45:06Z")

</div>

Thanks you

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [September 19, 2026, 9:45am UTC](https://forum.infinityfree.com/t/hosting-denied-access/120597/4 "2026-09-19T09:45:20Z")

</div>

Closed on September 19, 2026, 9:45am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
