Search code examples
urlseosearch-engine

URL: Directory like or Pages with extension


If you look at the url of the stackoverflow.com you can see that the url is like:

https://stackoverflow.com/questions/ask

or

Designing a website for both javascript script support and not support

or some very popular websites like wikipedia have the same format (en.wikipedia.org/wiki/MySQ)

So what's wrong with old .php .html index.php or index.php?show=ask-question ? what's the point in building the website in this format? better search rank? better surfing?


Solution

  • This is more general than just building websites. This is good practice for any large set of files you have to organise. https://stackoverflow.com/ is the root of the web server, the root of the filesystem as far as the web server knows (not over-complicating with virtual hosts e.t.c.). stackoverflow.com/questions/ will go into the directory called questions. Usually these directories will contain index.html or index.php and a bunch of other files|scripts|pages that are required for the main page to run properly.

    I don't think it affects your ranking. It only impacts your surfing if you often type exactly what you want in the URL bar rather than clicking on links from the main site. Even then, the impact is minimal. For the administrator/maintainer/developer of the website this system of building using folders and sub-folders is indispensable for any modern website.