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

試著忘記壹切 提交于 2019-12-10 14:59:53

问题


Is .html extension better than .php and .aspx for SEO ? or extension less url is better then all


回答1:


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.




回答2:


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.




回答3:


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.




回答4:


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




回答5:


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




回答6:


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




回答7:


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.



来源:https://stackoverflow.com/questions/1529565/is-html-extension-better-than-php-and-aspx-for-seo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!