Index.html - remove?


#1

Hi,

Is there any way to remove the “index.html” after the domain name? Let me explain.

When you initially go to my website, mydomain.com, “index.html” does not show up in url. But i have a link on every page in my website that leads to the homepage; if you click on the link, mydomain.com/index.html shows up in the url. i heard this was unprofessional and so I’m trying to find a way around it.

I tried editing the hyperlink to point to “mydomain.com” instead of pointing to the index.html file, but instead I get an error in the browser, and this is what I see in the url:

mydomain.com/mydomain.com

very strange. I’m sure there’s a simple explanation, but I haven’t been able to find one searching the forums.

Your help is much appreciated!


#2

I would set you links to be
a href="/"

or a href=“http://yourdomainname.com/

That should fix the problem.

-Jason

I40.com - Home Page
MP3Mystic - Personal Streaming Music server.
(No longer hosted with Dreamhost)


#3

nothing unprofessional about that… who told you that?


#4

great thanks, worked perfectly.


#5

I second that.


#6

I don’t know if I’d use the word “unprofessional”, but I do think that using the full filename in default-index URLs is inelegant compared to just linking to the domain or directory name, as I say in my site:

http://webtips.dan.info/subdir.html

My preferred method of linking back to main indices is , which works no matter what subdirectory level you’re in, not just at the root of the site like .

– Dan


#7

And, if you do want to link back to your full domain, be sure to include the “http://” part before it; if you leave it out, it’ll be considered a relative URL to a file or directory name (since it’s perfectly legal to name a subdirectory or file “yourdomain.com”… or “yourdomain.org” for that matter – why assume all arbitrary sites are commercial?). That’s why the link failed for you earlier.

– Dan