# 403 Forbidden and index.html file disappears after upload

**URL:** <https://forum.infinityfree.com/t/403-forbidden-and-index-html-file-disappears-after-upload/121810>\
**Category:** Hosting Support\
**Created:** [November 5, 2026, 2:42pm UTC](https://forum.infinityfree.com/t/403-forbidden-and-index-html-file-disappears-after-upload/121810 "2026-11-05T14:42:35Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [November 5, 2026, 2:42pm UTC](https://forum.infinityfree.com/t/403-forbidden-and-index-html-file-disappears-after-upload/121810/3 "2026-11-05T14:42:53Z")

</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._

Yes, there is a size limit, and it’s almost certainly why your `index.html` disappears. HTML, PHP and JS files are limited to 1 MB, and files over the limit are deleted automatically after upload. Your new file is about 1.5 MB, so it gets removed. The older, smaller version stays because it’s under the limit. Other file types, like images, can be up to 10 MB.

The article that covers this is below.

> [@Why are my files deleted after uploading them?](https://forum.infinityfree.com/t/why-are-my-files-deleted-after-uploading-them/49310):
>
> Sometimes, a file upload seems to complete normally, but the file is deleted right after. This is usually caused by one of the issues below. The file is not in an htdocs folder All website files must be uploaded to the main htdocs folder, or to the htdocs folder of a specific domain (like example.com/htdocs). Files created or uploaded anywhere else on your account are deleted automatically. The file type is not allowed Certain file types, like .exe and .apk files, are blocked for security and…

That also explains the 403. With no `index.html` in the folder, the server has nothing to show. The 403 article lists a missing index file as a cause.

> [@Redirected to InfinityFree 403 Forbidden page](https://forum.infinityfree.com/docs?topic=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…

To get under the limit, you could save the embedded images as separate image files and reference them from the HTML. That’s a general approach, not something from our docs.

On Viber, the browser security system blocks link previews. It checks that a visitor can run JavaScript and accept cookies, and preview bots can’t. The article lists link previews (Open Graph tags not being read) as something that doesn’t work, and says the check can’t be excluded for a path, file type or user agent. It can’t be turned off on free hosting either, and a custom domain doesn’t change that.

> [@Browser Security System - Features and Limitations](https://forum.infinityfree.com/docs?topic=49353):
>
> InfinityFree uses a security system on all free hosting accounts to ensure your website is accessed by real web browsers, not bots or automated scripts. While this protects your site from malicious traffic, it can affect certain types of access. How the security system works The system checks that visitors can execute JavaScript and accept cookies: features that all modern web browsers support. This verification happens automatically and most website visitors will never notice it. You may occa…

So fixing the file size will bring your page back, but I don’t see a way to get Viber previews working while the site is on free hosting. The article names [premium hosting](https://www.infinityfree.com/premium/) as the option for things the check blocks.

---

_[View the full topic](https://forum.infinityfree.com/t/403-forbidden-and-index-html-file-disappears-after-upload/121810)._
