SEO benefits of .html v/s jsp/php/etc?
html, jsp, php, seo
Solution
The document extension (*.html / *.php / *.aspx) makes no difference at all for your search engine ranking. If we leave out the page content for a moment, what matters with regards to URLs is:
- a logical and consistent URL structure, ideally a tree structure.
- using the right keywords in your URLs, separated by dashes.
- if possible avoid using query strings "?" in your URLs (getting less important, but still valid for the smaller search engines)
- the overall 'crawlability' of your site (having a XML sitemap, having plain-text links to all pages on the site, proper use of a robots.txt exclusions)
You can easily 'hide' the file extension type somewhat on almost all systems, by doing something like www.acme.com/mycms.php/pagename/ and then have mycms.php parse the requested URL.
Good modern web frameworks will allow you full control of your URL structure, examples are Django and ASP.NET MVC.
One thing that is hard is localization. There are many suggestions:
- use a separate site for each language (acme.com / acme.co.uk / acme.de / acme.ch )
- use a separate subdomain (en.acme.com / de.acme.com )
- use a extension www.acme.com/pagename.en.html
- use a root 'folder' www.acme.com/en/pagename
I think I have settled on the 'root folder' approach for now, but there are good arguments for the other approaches too.
For an example of a good URL structure, take a look at this very site. :-)
Problem
This may sound like a stupid question, perhaps it is. But I'm only trying to make sure there's no secret information hiding from me. Alright, so if I have the option of putting in extra effort to develop in plain html and hook up my back-end via ajax, do I go for it? Meaning, I could use PHP/JSP to include files such as headers, footers and navigation. This processing takes place upon user request for the file. But alternatively, I can use an ant build script to compile an HTML file from headers, footers, navigation, etc upon release. But that takes some effort. Keep in mind, that this is not an AJAX v/s non-AJAX question and resultant output file in both cases is the same, except for the file extensions.