开发者

Is .html extension better than .php and .aspx for SEO?

开发者 https://www.devze.com 2022-12-08 01:40 出处:网络
Is .html extension better than .php 开发者_运维技巧and .aspx for SEO ? or extension less url is better then allThe extension has little effect on rankings and all that SEO jazz.

Is .html extension better than .php 开发者_运维技巧and .aspx for SEO ? or extension less url is better then all


The extension has little effect on rankings and all that SEO jazz.

Your page's extension may not neccessarily indicate how the content was generated. A PHP or ASPX, whilst normally attributed with dynamic content, can quite easily always render static content. Furthermore, with some relatively easy configuration, you can get all .html pages to be processed as if they were a dynamic page (ie, index.html is actually a php file).

What I think you are concerned with is, "Is static content favoured over Dynamic content". Google says no:

GOOGLE: Dynamic vs Static URLS

The web is conflicted on this, as some people would expect static content to be preferable as it doesn't change (and thus won't invalidate results). But I tend to trust the big google.

I would focus more on the page content than the extension, as that is what the robots spend most of their time crunching.


I don't think extension will make any difference -- they can be faked, anyway, so Google and others most probably don't rely on those.

And as the "What to leave out" section of "Cool URIs don't change" states :

File name extension. This is a very common one. "cgi", even ".html" is something which will change. You may not be using HTML for that page in 20 years time, but you might want today's links to it to still be valid. The canonical way of making links to the W3C site doesn't use the extension.


The effect will be minimal but the modern tendency is to have no extensions. The URL is then more friendly to the user.

The shorter the url, the fewer characters in it and the the more 'power' the remaining words will have.


Forget the extensions. If you are more concerned about SEO, then use url rewriting - with meaningful filenames. You do not even need an extension.


No extension is always best, since Cool URLs Don't Change.


Probably not. The search engines (i.e. Google) are going to focus on content, not technology.


For SEO, I have no idea. I can't imagine it has any impact on SEO (and if it does, surely it is slight).

In general, though, I will disagree with those above. If all you ever return is HTML then it doesn't matter much, but if your site also provides XML and/or JSON (or other formats), the extension is a good way to disambiguate the format you'd like to have returned when there are multiple options.

Imagine a world where /users/12345.html returns a profile page of user with ID 12345. The extension gives you the ability to invoke /users/12345.json or /users/12345.xml.

This can be done with accept headers as well, but using the extension is easier and more transparent.

0

精彩评论

暂无评论...
验证码 换一张
取 消