Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is difference SEO differencence between:

  1. /index.php#mystate
  2. /index.php#!mystate
share|improve this question

migrated from stackoverflow.com Aug 22 '11 at 18:01

This question came from our site for professional and enthusiast programmers.

The difference in what aspect? In SEO? Please be more precise. – Gumbo Aug 22 '11 at 17:52
In SEO ........ – faressoft Aug 22 '11 at 18:00

The fragment identifier (when dealing with the URI of an HTML document) is supposed to be used to link to specific parts of a page. It isn't sent to the server.

In the last few years it has been used as a hack to maintain state information in websites that make heavy use of Ajax.

The use of a fragment identifier starting with a ! character is a further hack on top of this to tell Google how to generate a real URI for indexing purposes.

The introduction of pushState eliminates the need for these hacks in modern browsers.

For browsers that don't support pushState some people take the approach of falling back to the hashbang hack, while others (such as GitHub) fall back to normal links (instead of using Ajax for major content changes in browsers that don't support pushState).

share|improve this answer

The exclamation point, eliminates the case of an empty hash like example.com/index.php# which would make the page scroll to the top.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.