# Index.php returns 404 but test PHP files work

**URL:** <https://forum.infinityfree.com/t/index-php-returns-404-but-test-php-files-work/121515>\
**Category:** Hosting Support\
**Created:** [October 22, 2026, 3:41pm UTC](https://forum.infinityfree.com/t/index-php-returns-404-but-test-php-files-work/121515 "2026-10-22T15:41:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharatzing\_help](https://forum.infinityfree.com/letter_avatar/bharatzing_help/32/6_449c533f586939b6e5f246632a46421f.png) [@bharatzing\_help](https://forum.infinityfree.com/u/bharatzing_help)\
**Post date:** [October 22, 2026, 3:41pm UTC](https://forum.infinityfree.com/t/index-php-returns-404-but-test-php-files-work/121515/1 "2026-10-22T15:41:38Z")

</div>

### Website URL

[https://bharatzing.kesug.com/](https://bharatzing.kesug.com/)

### Error Message

Sorry, the page you are looking for does not exist

### Other Information

Hello Support Team,

My website is [https://bharatzing.kesug.com/](https://bharatzing.kesug.com/)

The file index.php returns a 404 error, but home\_test.php and index\_test.php work correctly.

The old homepage opens from index.html. My index.php file is in the htdocs directory and is about 11 KB.

I tested renaming index.php to other filenames, but those files also returned 404.

There is no .htaccess file in htdocs. The domain directory shows [bharatzing.kesug.com/htdocs](http://bharatzing.kesug.com/htdocs), and Health Check says “No issues found”.

Please help me find out why my main PHP homepage returns 404 while the test PHP files work.

Thank 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:** [October 22, 2026, 3:41pm UTC](https://forum.infinityfree.com/t/index-php-returns-404-but-test-php-files-work/121515/2 "2026-10-22T15:41:39Z")

</div>

Welcome to the InfinityFree community forum! Good to have you here.

- Most people answering here are volunteers. They’re often the fastest source of help. Admin (the only staff member) checks in about once a day for issues on our end.
- Volunteers can’t see your account or website. Share what you actually see, like error messages and what happens when you try something. That’s more useful than your theory of what’s wrong.
- AI tools often get InfinityFree wrong. If a volunteer’s advice differs from what an AI told you, please try the volunteer’s suggestion first.
- Solving an issue is a joint effort. Try the suggestions you get and report back what happened.

---

<div class="post-metadata">

**Author:** ![Lemni](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/lemni/32/68303_2.png) [@Lemni](https://forum.infinityfree.com/u/Lemni)\
**Post date:** [October 22, 2026, 3:41pm UTC](https://forum.infinityfree.com/t/index-php-returns-404-but-test-php-files-work/121515/3 "2026-10-22T15:41:56Z")

</div>

_Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look._

I think the 404 may come from your `index.php` itself rather than from our server. The same file, renamed, gives the same error, while `home_test.php` and `index_test.php` work. That points at what’s inside the 11 KB file, not at where it sits.

Two questions will tell us which it is:

1. When you open the broken page, does the browser stay on `bharatzing.kesug.com`, or does it redirect to `infinityfree.net/errors/404/`?
2. If you search `index.php` for the text “Sorry, the page you are looking for does not exist”, do you find it? Is the file a framework or router script that shows its own “not found” page when it doesn’t recognise the request path?

Our knowledge base describes the redirect to the InfinityFree 404 page, and the usual reasons a file isn’t found. Those are a wrong folder, wrong capitalisation, or `.htaccess` rules. A file that exists directly in `htdocs` and has a working PHP sibling doesn’t fit those.

This article explains how that 404 page works:

> [@Redirected to InfinityFree 404 error page](https://forum.infinityfree.com/docs?topic=49355):
>
> While working on your website, you may be redirected to the [InfinityFree 404 error page](https://infinityfree.net/errors/404/). This article explains why this typically happens and what you can do to fix this. Why do I get a 404 error When you try to access a file on a website, the server tries to find the matching file to load. By default, it works like this. Suppose you have a website [http://example.com](http://example.com) which is linked to the folder htdocs in your hosting account. If you then try to load a certain URL, like [http://example.com/blo…](http://example.com/blog/images/gallery/photo.jpg)

---

<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:** [October 22, 2026, 4:33pm UTC](https://forum.infinityfree.com/t/index-php-returns-404-but-test-php-files-work/121515/4 "2026-10-22T16:33:35Z")

</div>

![image](https://forum-cdn.infinityfree.net/original/3X/a/3/a3c14f7f650273956caf357e76dca24df2024fb1.png)  
seems to be working now.

It was likely just a propergation issue

---

<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:** [October 29, 2026, 4:33pm UTC](https://forum.infinityfree.com/t/index-php-returns-404-but-test-php-files-work/121515/5 "2026-10-29T16:33:52Z")

</div>

Closed on October 29, 2026, 4:33pm UTC

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