Make .htaccess file visible and editable for the Replit users

Describe your feature request
I’d like that Replit to make visible and editable the .htaccess file. This a very important file that gives a lot of features to a web page, without it a web is not so good.

What problem(s) would this feature solve?
It will let people :

  1. Create a custom 400 page
  2. Create a custom 401 page
  3. Create a custom 403 page
  4. Create a custom 404 page
  5. Create a custom 500 page
  6. Get rid of the HTML file extension in the URL
  7. Stop making people create a folder and putting an index.html file inside to not get the HTML extension in the URL
  8. Make people write less JS code making webs have a higher score in Lighthouse

Explain what you were trying to do when you came across the problem leading to this feature request
I was trying to make a custom 404 page, I didn’t know how so I tried searching in Stackoverflow for some JS code that could help, but sadly I didn’t find anything that worked, that’s why I tried accessing the .htaccess file, but I couldn’t find it.


I agree that this would be very very useful.

It would also allow users to:

  • Change the web server root directory so that you can have a folder with all HTML files and have other files outside that folder that are not accessible via the Web
  • Allow for making a specific file/folder require Authorization

It would be great if this was added.


you can already do #1. Just uncomment the hosting table in the .replit file and change the directory


Ok but what about custom 404 pages on HTML Repls?

You need the .htaccess file!


If you create it (since it is not present by default) it will be accessible BUT it will not have any effect whatsoever on the website. So doing this won’t work. The .htacces is not invisible, it is non-existent. You must create it, but doing so does nothing anyway. Replit need to add support for it themselves.


What do i put in the directory?

Putting my 404 page just makes the repl inaccessible…

1 Like

Sorry for confusion. Was addressing

1 Like

That wouldn’t work, because Replit doesn’t use Apache for a web server.

1 Like

I highly agree that a .htacces should be editable! Currently, replit does not support 404 pages, or other more complex URL changes via .htaccess files. It’s such a pain – I have to convert it to github repository and do all that – just make a htacces file! It’s really simple!

1 Like

Well, what if Replit doesn’t use Apache?

1 Like

Wouldn’t this cause several possible problems?

Just from looking up what the .htaccess file is, the .htaccess file is commonly used in web servers to configure security settings, access controls, and other server-level configurations. So allowing Replit users to edit this file directly could introduce security vulnerabilities if they make incorrect or malicious changes. And it could potentially lead to unauthorized access, directory traversal attacks, or other security breaches. Also if multiple users are allowed to edit the .htaccess file concurrently, there may be conflicts between their changes.


That’s not allowed as the ToS states. If they make incorrect changes, well… they shouldn’t have messed with the file if you don’t know what to do with it.

People can get Apache on their repl if they wanted to. Then, they can make a .htaccess file themselves. So no big changes happen here, it’s more like Replit is making your life easier.

Again, this is nothing new if you use Apache on your Repl. Probably should mean you’re prepared for them.

Pretty sure you can configure your Repl currently as long as you get the correct software.

That is a good point. I feel only owners should see, and edit a .htaccess if it was added.

BTW I got some of the info from 9pfs1, if I said something wrong… blame him correct me.


Lol :rofl:

What’s 9pfs1?

1 Like
  1. *Who is

ah, i thought they were a source, im used to seeing things like p5js and other strips of characters.

1 Like