Would using javascript onclick functions to override href target be ok?
-
Hi all,
I am currently working on a new search facility for me ecommerce site... it has very quickly dawned on me that this new facility is far better than my standard product pages - from a user point of view - i.e lots of product attributes for customers to find what they need faster, ability to compare products etc... All in all just better. BUT NO SEO VALUE!!!
i want to use this search facility instead of my category/product pages... however as they are search pages i have "robots noindex them" and dont think its wise to change that...
I have spoken to the developers of this software and they suggested i could use some javascript in the navigation to change the onlclick function to take the user to the search equivelant of the page...
They said this way my normal pages are the ones that are still indexed by google etc, but the user has the benefit of using the improved search pages...
This sounds perfect, however it also sounds a little deceptive... and i know google has loads of rules about these kinds of things, the last thing i want is to get any kind of penalty or any negative reaction from an SEO point of view... I am only considering this as it will improve the user experience on my website...
Can any one advise if this is OK, or a "no no"...
P.s for those wondering i use an "off the shelf" cart system and it would cost me an arm and a leg to have these features built into my actual category / product pages.
-
Hello James,
Why do these pages have "no SEO value"? Is it because they are AJAX pages or because you have them noindexed? Or both?
To answer your original question, using an on-click javascript event to send a user to a page other than the URL listed in the href tag is borderline. It goes beyond the risk level I would feel comfortable with on an eCommerce site, but a lot of affiliate sites do this. For instance, all of their links out to merchant sites may go through a directory called /outlink/ so the href tag might look like .../outlink/link1234 and appear to send the user to another page on their domain, when actually the user gets redirected to the merchant's (e.g. Amazon.com, Best Buy...) website. Sometimes the user is redirected from the /outlink/... URL and sometimes they never even get that far because the javascript sends them to the merchant's URL first.
It is not cloaking unless you are specifically treating Google differently. If Google doesn't understand your site that is their problem. If you have code that essentially says "IF Google, THEN do this. ELSE do that" it is your problem because you are cloaking. Make sense? There is a very distinct line there.
The bottom line is if you want to show users a certain page then you should be showing that page to Google as well. If the problem is the content on that page doesn't appear for Google (e.g. AJAX) then you should look into optimizing that type of content to the best of your ability. For example, look into the use of hashbangs (#!) as in:
https://developers.google.com/webmasters/ajax-crawling/docs/getting-started
-
1. Google understands simple JS that is inline with your HTML. So Google understands that
is a link to domain.com. You can obfuscate this further and Google might not understand it. I've not seen Google try to parse or execute JS but that doesn't mean they can't or won't in the future.3. Google is very unlikely to spider AJAX. Many AJAX pages don't return any user readable content (most of mine return things like JSON, which is not for end user consumption) and , as such, are beyond the scope of indexation. Again, as in #2, you might want this content to be shown elsewhere if you want it indexed. https://developers.google.com/webmasters/ajax-crawling/
-
ok, i am not keen on this approach, the developers have offered an alternative... but again, i'm not sure about it, they have said they can use ajax to force their search results / navigation over my current navigation / products on my category / product pages...
this gets rid of having to use javascript to send to different url... but up above Alan mentions cloaking, which to my understanding is basically serving anything different for a search engine / person... and thats what this will do... it serves up a different navigation to people... and the products could be listed in a different order etc... search engines do not see the ajax...
Is this any better? or just as negative?
-
Are they identical, you say the search equivalent, I just wouldn't treat search engines any different
-
even thou the content is identical?
It is only the way that content can then be navigated that is different...
-
Well then, yes I would be concerned, you are serving up different content to users, that is cloaking.
-
Hi Alan,
i think i may have explained incorrectly - my search page does have the meta tag noindex,follow - it also has a canonical link back to the main search page (i.e search.html) so i do not think any of the search results will be indexed. So my concern is not duplicate content, this should not happen...
My concern is the fact i am using javascript to litterally divert customers from one page to another... its almost like the static pages are there only for the benefit of google... and thats concerning me...
-
Google can follow JavaScript links, unless you are very good at hiding them.
I would not worry too much about the duplicate content, don't expect the duplicates to rank, but your not likely to be penalized for them. you can use a canonical tag to point all search results back to the one page.
I would not no index any pages, any links pointed to a no-index page are pouring their link juice away. if you want to no index a page use the meta tag no-index,follow, this way the search engine will follow the links and flow back out to your site
read about page rank and how link juice flows
http://thatsit.com.au/seo/tutorials/a-simple-explanation-of-pagerank
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Excessive use of KeyWord?
Hey I have an Immigration website in South Africa
Technical SEO | | NikitaG
MigrationLawyers.co.za and the website used to be divided in to two categories:
1st part - South African Immigration
2nd part - United Kingdom Immigration Because of that we made all the pages include the word "South Africa" in the titles. eg.
...ers.co.za/work-permit-south-africa
...ers.co.za/spousal-visa-south-africa
...ers.co.za/retirement-permit-south-africa
...ers.co.za/permanent-residence-south-africa I'm sure you get the idea.
we since, removed the UK part of the website and now are left only with the SA part. Now my question is: Is it bad? will google see this as spammy, as I'm targeting "South Africa" in almost every link of the website. Should I stick to the structure for new pages, or try to avoid any more use of "South Africa". Perhaps I can change something as it currently stands? Kind Regards
Nikita0 -
Using the Moz to weed out bad backlinks
How do you use the opensite explorer to weed out bad backlinks in your profile, and then how do you remove them if you cannot contact the various webmasters.
Technical SEO | | marketing-man19900 -
Use of title tags on divs for SEO purposes
Hello community, I recently was asked by a client to analyze a website of a competitor. I did was he asked me to do but when I looked at the source code of the website I found this code: I changed the exact words into something for privacy reasons, but I never looked at a code like this.
Technical SEO | | JarnoNijzing
Using a div for an anchor I get but adding a title tag to the div? I never seen that before. Title tags on anchors, yes, using images in divs as background and then adding a title??? Does anyone have any experience with a code like this and if you do how does this impact rankings? Does it impact rankings at all and does anybody know of any correlation between the two? Looking forward for your responses. Regards Jarno0 -
Which forum platform has the best "SEO Functionality"?
I have used vBulletin with vBSEO for a number of years and have been happy with the SEO results that I have achieved. However, vBulletin's recent releases have become unstable, full of bugs and are not secure. I am intending on starting some new forums in the near future and would like to move away from vBulletin. I have heard good things about Xenforo and IP Boards. Does anybody have any experience with either platforms built in SEO functionality?
Technical SEO | | statman870 -
When should we use Remove URLs feature on Google Webmasters Tool?
Hi there, I run an ecommerce website on Magento. We are no longer using a category. It actually does not appear on the menu: mydomain.com/category.html If this is the case, do you recommend to remove it through the Removal URL feature on GWT? I don't want this to affect the juice of other links of the site such as: mydomain.com/product.html Thanks very much. Regards
Technical SEO | | footd0 -
Do You Have To Have Access to Website Code to Use Open Graph
I am not a website programmer and all of our websites are in Wordpress. I never change the coding on the backend. Is this a necessity if one wants to use Open Graph?
Technical SEO | | dahnyogaworks0 -
Keyword targeting by page, site, or both?
Hi, We recently discovered that a product we sell has a misnomer, and that a ton of people take to Google and use variations of that misnomer while trying to find us. Unfortunately we don't rank in Google for this keyword, and its costing us thousands in lost sales. I've been slowly building the misnomer into the content of our site in hopes that the spiders will pick up on it. It has started to work in the last couple weeks, but we're nowhere near the top (and we are #1 and #2 for most of our other prime keywords.) The site which sells the product is specialized, and only sells this specific product (in different models, but they're all the same product essentially.) With that in mind, I'm trying to figure out the best way to attack a new keyword. I know that normally you would dedicate a specific page (in an eCommerce store probably that product's own page) to employ your SEO tactics. However, because this site specializes in this product and offers different models and information about it I'm confused about the best approach. Does Google take into consideration the entire site a s whole, or are the pages within my site competing against each other for rank?
Technical SEO | | ninjaprecision0 -
Is it ok if a company address is located in the footer which is in a external php file?
We all know that a company's address must be in the footer on every single page. But what if that actual address resides inside an external php file. Meaning the entire footer is an external php file. Will that affect local seo negatively? thanks for your help.
Technical SEO | | RogersSEO1