First, I'd like to preface this question by stating that I insist upon publishing a file name suffix, but only on the outer most entity of our site, the detail pages. I do realize the suffix is not necessary, and as such, some people just don't use it in their URL rewrite rules.
Our basic logic is as follows:
- Top Level: h t t p://no-host-name.just-the-domain.tld/
- Next Level Deeper, append a "directory" of:
- Next Level:
- Next Level:
Each level is one click deeper, making all site content no more than four clicks deep -- good for getting spidered. ALSO -- and I like this "feature" -- you can actually remove the right-most piece of each rewritten "directory" and it will serve a page that is a list of links to all of the groups of data belonging to the classes depicted in the directories comprising the rewritten URL.
The fourth click down results in a detail page, such as: name-of-entity.html
So the question: what should I write as a suffix to the file name?
It seems to be mis-leading to rewrite the URI having a suffix of html. I do believe the consensus suggests (still?) that .html is most favored. However, our technology platform, more accurately, would publish content using a page suffix such as .php or .asp. I do recognize there is a slight security benefit to masquerading the suffix that tells the world what your platform is.
However, isn't it kind of black-hat-like to use a suffix of .html? Paranoia causes me to believe that Google may detect URL rewrite and potentially trigger the so-called over optimization penalty.
Supporting use of the HTML suffix is the fact that we are, indeed, serving HTML content to a browser. It would make less sense to arbitrarily pick .pdf or .doc -- which sometimes scare away clicks when seen among search results.
Also, to reiterate my earlier insistence that I prefer to use a suffix, it's because it completes our depiction of a logical hierarchy:
- the site
- rewrite directory one - the general silos of information
- rewrite directory two - a folder containing more folders
- rewrite directory three - the folder that has the documents
- rewrite document name
All directories end in a forward slash, and in contrast, documents, at least typically, have a suffix and do not have the trailing slash.
I recognize there are certainly other dragons to slay in the course of a workday, but at the moment I am trying to finish up our URL rewrite, which makes this top of mind for me.
Can anyone cite examples to encourage or discourage the rewriting of a suffix of any particular type? And, please, if you see errors in my logic or directory hierarchies, I want to hear what you have to say. Thank you.
*.html. PHP/ASP/etc. are just server-side middleware. They can output any type of data they want. It doesn't matter to Google, web browsers, or users what is used to generate the HTML/XML/RSS/JSON/SVG output. The
.aspextensions are just used so developers know what type of file it is and for web servers to know what to parse the files with. If you're using rewritten URLs, then those extensions are irrelevant.
.htmlbut I made a big mistake - I had a
.htmlfile by the same name. One day the rewrite engine broke and users were sent to the
.htmlwas an alpha-development version of the page and I had written some... less than flattering and quite obscene placeholder text describing the troubles I was having. Approximately 1000 people saw this and I was chewed out big time. So it pays to be careful.