Search without .html extension

I hosted this weeks ago, I have a webpage named “Naub.html” however I realised that whenever I write the address ‘campus’ it shows error. But I include the extension (.HTML), my page displays.

My concerns:

  1. How can I access any of my webpage on browser without adding .html ?

  2. Must I save the files with .html or there is another way ?
    This affect my page visibility on Google search engine. I hope u assist.


for to work, create a folder in htdocs called “Naub” and make the file inside of it “index.html.” That file will be fetched when the folder’s name is called


You can do many tricks for that. Either using .htacess or creating a dedicated folder.

It’s up to you because you are the one who code. For me, I prefer static vs dynamic content & formats.

No, as long as you guide the Google Crawlers what they should index & not. Use robot.txt.


You might need to Google your issue before asking :slight_smile:

Does it help you?
.htaccess - How to remove .html from URL? - Stack Overflow

I prefer this one and not creating folders because it’ll waste inode limit space.


Thanks very helpful.
As for your third response, do you mean I can actually save html file as robot.txt ?

Sorry I don’t understand your question. you shouldn’t save as robot.html.

About indexing these pages, it won’t affect my page visibility on Google search engine. Depending on what pages you want google to index. it should index If you give this url to google and not Naub.html ones


And only put your robot.txt not robot.html to your root domain folder. yourname,com/robots.txt not yourname,com/folder/robots.txt

1 Like

Try creating Naub folder, and renaming Naub.html to index.html, and put the index.html into Naub folder.


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