It looks like bots are trying to follow the link in the script snippet as well as, or instead of, the actual link destination. As that link is only there to track what people have clicked on, and doesn’t actually resolve to the correct page but instead to a 404 error, it looks like that’s why Googlebot is having trouble.
Very interesting about the Javascript code. It is not in the content HTML.
<strong><a title="About Cosmetic Dentistry" href="http://www.aboutcosmeticdentistry.com/">About Cosmetic Dentistry</a></strong> - Learn about procedures, view photos and find out how you can beautify your smile with cosmetic dentistry.
Turns out the Wordpress Google Analytics program was set to track outbound links. I disabled that, and now the Javascript is gone in the source view.
Many thanks for pointing me in the right direction.
We had an issue that also added a redirect between where the user clicked and the end destination, caused by some google tracking stuff. The client noticed it when clicking on links lead to blank pages (it seems the intermediate google server was down for an hour or so and the client (understandably) freaked out).
BTW wonder if you can remove this in your htaccess file:
<IfModule mod_rewrite.c>
If you know you have mod_rewrite, get rid of that. It’s a silly-expensive check that I believe happens at every request. For some reason it seems default with some hosting setups as a safety feature, but it’s only meant as safety when you’re first setting up and might not have mod_rewrite.