jaymc Posted May 29, 2008 Share Posted May 29, 2008 Im currently looking into SEo (Search Engine Optimization) A lot of my website uses ajax, so no hard ahref links, most of them are like this open_url('scripts/view_members.php?id=3', 'divframe'); However, I can also access them via modRewrite urls such as www.site.com/view_members/3 Problem is, I must use ajax for navigation, but because of that google is not really going to see my nice and neat URL's I am just wondering what I can do to let google see all my modRewrite URL's I have thought of this but not sure if google will like it <a href="http://www.site.com/view_members/3"><img src="transparent.gif" height="1" width="1"></a> Not I dont want members navigation via this hard link so its practically an invisible image I dont suppose google knows that its a 1px image, thus not really a valid one? If google reads my site will it see those dummy links ok and index them? Quote Link to comment Share on other sites More sharing options...
haku Posted May 29, 2008 Share Posted May 29, 2008 It will see and index them. Quote Link to comment Share on other sites More sharing options...
jaymc Posted May 29, 2008 Author Share Posted May 29, 2008 Is it the best way to go about it, the method above Or should I be going down another road Quote Link to comment Share on other sites More sharing options...
haku Posted May 29, 2008 Share Posted May 29, 2008 Well, google won't be able to index your content if your links are dead, as it can't follow them. The ideal method is to build your site entirely in php so that it can be used without any ajax at all. Then, add ajax over top using unobtrusive javascripting methods. This means that all the ajax will work for people who have javascript turned on, and your site will still function fine for people who have it turned off, which includes all the search engines. It's more work, but if you want your site to be indexed properly, it's what you have to do. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted May 29, 2008 Share Posted May 29, 2008 A short term solution would be to create a static link in the footer to a sitemap, and put all links in there! Quote Link to comment Share on other sites More sharing options...
haku Posted May 29, 2008 Share Posted May 29, 2008 Nice idea! Quote Link to comment Share on other sites More sharing options...
jaymc Posted May 30, 2008 Author Share Posted May 30, 2008 A short term solution would be to create a static link in the footer to a sitemap, and put all links in there! Are you allowed to do that? Its not really true content.. If you can do that I could just have a sitemap with litterally 100,000 links on to all my pages with the nice fancy URL's Can I get away with that? Quote Link to comment Share on other sites More sharing options...
calabiyau Posted May 30, 2008 Share Posted May 30, 2008 Another idea that i've used recently and it google seems to follow the links just fine <a href="path/to/your/files." onclick="your_ajax_function(); return false;">Link</a> Since google ignores your javascript it "should" still follow the link in the href.(it has in my case). All your normal users will get the ajax function and the return false tells js not to follow the link after executing the function. But it will depend highly on what your content pages look like. And you must remember that if google is indexing the page via the hard link, then a person may stumble upon your site that way as well, and can they still use/navigate your site...? Quote Link to comment Share on other sites More sharing options...
haku Posted May 30, 2008 Share Posted May 30, 2008 calabiyau - that is part of the method of unobtrusive javascripting, which I mentioned in an earlier post. Build your site so it works without the javascript, then add the javascipt over top. Your method is good because it does precisely that! jaymc - I'm not sure if you can get away with that or not, but if it's one single sitemap that is linked to each page, it seems to me that it would be ok. But that's an educated guess, not actual knowledge. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted May 30, 2008 Share Posted May 30, 2008 A short term solution would be to create a static link in the footer to a sitemap, and put all links in there! Are you allowed to do that? Its not really true content.. If you can do that I could just have a sitemap with litterally 100,000 links on to all my pages with the nice fancy URL's Can I get away with that? Yes. I'm surprised you never heard of a sitemap before. It should be useful to a daily user as well. So don't just pile links in there, make it fancy pantsy and interesting! Realize that this is a "Short Term" solution. Google will rank you terribly if that is the only way it can navigate through your site. Quote Link to comment Share on other sites More sharing options...
jaymc Posted May 30, 2008 Author Share Posted May 30, 2008 Another idea that i've used recently and it google seems to follow the links just fine <a href="path/to/your/files." onclick="your_ajax_function(); return false;">Link</a> Since google ignores your javascript it "should" still follow the link in the href.(it has in my case). All your normal users will get the ajax function and the return false tells js not to follow the link after executing the function. But it will depend highly on what your content pages look like. And you must remember that if google is indexing the page via the hard link, then a person may stumble upon your site that way as well, and can they still use/navigate your site...? Cool, I like that, will come in useful for a lot of links Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.