Only my main page shows up on a Google search on site:domain.com and I start to wonder why this happens. I also use Google Webmaster Tools which confirms this.

On my main page, I have these types of links

<a href="1234/some-nice-seo-text" onclick="loadPageWithAjax(1234); return false;">

The 1234 is the id of the page to load and the '/some-nice-seo-text'-appended is just a good description of the content of the page, which I hope the Google-bot will catch. The intended user will click the link and the same content will dynamically be loaded and shown. It seems like the Google-bot never follows these links - am I doing something wrong?

  • 1
    It appears so. Test using Fetch as Google in the Webmaster Tools.
    – closetnoc
    Mar 13, 2014 at 18:57
  • That tool was very helpful to me Mar 14, 2014 at 18:21
  • Good. I thought it would be. Glad to help.
    – closetnoc
    Mar 14, 2014 at 18:25

2 Answers 2


You are using path relative URLs in your href attribute. The problem is that the actual link destination depends on the page where the link is.

An example:

<a href="testlink">Testlink</a>

When the link is at http://www.example.com, the link will be expanded to http://www.example.com/testlink.

However, when the link is at http://www.example.com/subpage, the link will be expanded to http://www.example.com/subpage/testlink.

In general, it is really easy to shoot oneself in the foot by using path relative URLs in links. By using / in the start of href attribute, you ensure that all URLs are domain relative.

Does Webmaster tools show any crawl errors?

You should also test your page links by right-clicking on the link on your page, copying link location and then browsing to that page in another window. This way you can see if the links work right.


I had a rewrite in my .htaccess file to change http://www.domain.com to http://domain.com. After changing the rewrite to work in the opposite way, that is, rewrite from http://domain.com to http://www.domain.com, it finally worked. I confirmed this using the Fetch as Google tool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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