Mobile app version of vmapp.org
Login or Join
Looi9037786

: Difference between linking to specific page or folder Is there a difference between linking to www.example.com/site/index.html and www.example.com/site/ since it'll point to the same page? I point

@Looi9037786

Posted in: #Html #Hyperlink #Path

Is there a difference between linking to example.com/site/index.html and example.com/site/ since it'll point to the same page?
I point everything i can to a folder on my website, i just think it looks better when the browser doesn't display the name of the file.
Is this wrong, right, good or bad?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Looi9037786

2 Comments

Sorted by latest first Latest Oldest Best

 

@Alves908

example.com/site/index.html and example.com/site/

Pointing to the bare directory, without the directory index, is prefered.

Although the same content might be displayed on your server, these are different URLs. Search engines will see these two URLs as different and might perceive this as duplicate content if both these URLs are used on your site, or in-bound links go to both. Only "www.example.com/site/" should be used (it's cleaner) and ".../index.html" should redirect to ".../". The actual file returned when you request "www.example.com/site/" is dependent on your server and the value of the DirectoryIndex directive (Apache). It could be anything you like, not necessarily "index.html".

From an SEO point of view it is only "bad" if you mix the two and both are accessible.

10% popularity Vote Up Vote Down


 

@Vandalay111

It's better to link to the folder


If sometimes you link to example.com/site/index.html and other times to example.com/site/ you will end up with a spitted pagerank


If you link to a page instead of a folder


It's harder to remember. (was it example.com/contact or example.com/contactUs.html?) It looks ugly as hell
You are exposing the technology behind the page (index.php, index.asp, etc) and if later you decide to switch you will have a hell of a time mapping the old urls to the new ones

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme