Link back to index.html

In htdocs I have an index.html.

In htdocs there is a folder and in that folder there is an HTML file. That file has a link back to the index.html like so

I get an 404 though.

What could be the problem here?

when you call that file that is inside folder
then that file (page) looks with “his eyes” inside that dir
and there is no index.html file there “for him”, but it is outside (a step above) that folder

so you have to edit the path for index.html (home) inside of that file in subdir

or use / for all paths (so they will look from the root)

Or to clarify even more
hypothetical… you have an html file named page2 in a subdirectory named xx1

your index.html file is on root
and when you want to access file page2 through it
then this is the address (in your index.html file code)
a href="xx1/page2.html"

but once you open the page2 file, it becomes the current file/directory

so if you want to return to index.html (home) from page2 file

then in that page2 file you have to edit the path for index.html

you can do it in several ways:

the first is a href="../index.html"

the other way is

a href="/index.html"

the third would be absolute.

Or a more banal example to better understand what it is about

I’ll put you in the room :slight_smile:
and there is a big box and a banana on the floor
you are standing next to those two objects

:man_standing: :banana: :gift:

when I ask where is the banana? you answer “right next to me”

when I put you in a box (folder)
and I ask where is the banana now?

you will say = outside this box ../banana

if I put you in a box and then in another box and ask where is the banana now ?
you will say two boxes outside ../../banana away from me


Thanks for trying to answer my question. For some reason, my question has been edited so that the way I created the link is not visible anymore. I did it exactly, as you describe with a relative link (…/index.html), yet it is not working. Think it must be related to some technicality of infitinity.


it was not edited that way, but before this topic you made the same one (in which the link was mentioned), but you deleted that topic. You did not mention “home” in this topic.

Give us the website address so we can check what’s going on

1 Like

This is the site. When you click on impressum, you get to the site where the link that should lead back to index is which is not working.

1 Like

index.htm not index.html

edit the a href to show the correct extension (.htm)

edit this file (home url)

you should have immediately checked that you are using a shorter version of the extension
but in your question, you stated that you have a file named index.html

and is actually index.htm


You can also do use ../ and omit the index.htm part entirely, you don’t have to necessarily link to the file since it’s the index (so when loading the home directory, it will automatically load).


I changed it, but it is still the same. I had checked that before and changed back and forth.

For me it now works fine; maybe you renamed the index file to index.html and now it works. If it still redirects you to a 404 page or it simply doesn’t work:

Please clear the browser cache by pressing a few times Ctrl + F5 while viewing your website.
If that doesn’t help (because some browsers are stubborn) then follow these instructions:


you didn’t change it


it should be index.htm here

1 Like

Wow. It really was the cache now.

Thanks for the help!



you also have a 404 error here, but that is probably still under construction


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