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
-
Ranking in .com .fr .de but not in my target .cz serp?
Hello, our website is targeted for the Czech Republic. When I monitor our rankings, we have very high rankings in all of the other SERPs like .com and .fr .de but we are in the very end of CZ serp. Not CZ is the only SERP where we have two languages (Czech which is on subdomain cs.domain.com and domain.com which is for english). Now i am concerned about the example.com. Why is it not ranking at all (very low in czech serp like 130 vs 10-15 in other serps) We have used href lang tags to specify the language I think Can it be because of my cs. domain is optimized for a keyword which is not the example.com keyword ? (I think this is not the reason) - my example.com domain optimization is for "Kids clothes in Czech Republic" but cs domain for "Used clothes in Czech Republic" is it a linking issue? Should I have more local Czech links? Im out of ideas.
Technical SEO | | advertisingtech0 -
Can OG titles be used as a substitute for Meta titles
We use og (open graph) titles in lieu of meta titles. Is there any downside to using just one. Should we be using both og and meta titles on our page. Appreciate any insight. Himanshu
Technical SEO | | patilhimanshu0 -
Javascript redirects -- what are the SEO pitfalls?
Q: Is it dangerous (SEO fallout) to use javascript redirects? Tech team built a browser side tool for me to easily redirect old/broken links. This is essentially a glorified 400 page -- pops a quick message that the page requested no longer exists and that we're automatically sending you to a page that has the content you are looking. Tech team does not have the bandwidth to handle this via apache and this tool is what they came up with for me to deliver a better customer experience. Back story: very large site and I'm dealing with thousands of pages that could/should/need to be redirected. My issue is incredibly similar to what Rand mentioned way back in a post from 2009: Are 404 Pages Always Bad for SEO? We've also decided to let these pages 404 and monitor for anything that needs an apache redirect. Tool mentioned above was tech's idea to give me "the power" to manage redirects. What do you think?
Technical SEO | | FR1230 -
Client bought out shop but used existing phone number
We have a client in Nashville who opened his first location on Spring St., then later bought out PAC Auto to open a second location on Dickerson St. Lately, we noticed that the Dickerson location wasn't ranking. I found that the previous business owner at Pac Auto had already built up a good web presence and that sigh our client was using their old number. Basic NAP violation, ok, got it. But what to do next? I decided to update PACs citations with The Car People's business name and website. Where I was unable to edit or where listings were already claimed, I just reported PAC auto as closed. But yesterday I noticed not only was the Dickerson location still not ranking, but the Spring street location had indeed dropped several places too! (edit: I'm referring to local search results here as we don't own the site) What kind of beast have I stirred?! What kind of signals am I sending to Google that are devaluing the Spring st. location? Will things get worse before they get better? What can I do to make some progress on one without hurting the other? Is it worth trying to get the previous business owners logins (not likey)? Talk to The Car People about getting a new number (not impossible)? Is it worth trying to get the site in order to build separate landing pages for each location? Thanks in advance!
Technical SEO | | cwtaylor0 -
Question about duplicate images used within a single site
I understand that using duplicate images across many websites was become an increasingly important duplicate content issue to be aware of. We have a couple dozen geotargeted landing pages on our site that are designed to promote our services to residents from various locations in our area. We've created 400+ word pieces of fresh, original content for each page, some of which talks about the specific region in some detail. However, we have a powerful list of top reasons to choose us that we'd like to use on each page as is, without rewriting them for each page. We'd like to simply present this bulleted list as an image file on each page to get around any duplicate written copy concerns. This image would not appear on any other websites but would appear on about two dozen landing pages for a single site. Is there anything to worry about this strategy from a duplicate content or duplicate image perspective in terms of SEO?
Technical SEO | | LeeAbrahamson0 -
Should I rename URLs to use hyphens instead of underscores?
Hello. We are about to launch a redesigned and significantly expanded site that has traditionally used underscores as separators between words in its URLs. Would you recommend replacing all the underscores with hyphens? That would then require many 301 redirects to maintain any links that might be out there. Thank you!
Technical SEO | | nyc-seo0 -
Google Penguin - Target Landing Page
Hello, One of our sites have been hit by the first penguin update back in April and ever since then we have been removing links and submitting reconsideration requests... It only seems to have affected our home page as some of our internal landing pages are still ranking OK in the SERPS #1 / #2. I'm just wondering if we created a landing page for this keyword and drove high quality / relevant links to this landing page could we get it to rank higher than our homepage even though our Homepage is on the 5th page.Hope the above make sense. Has anybody had any joy with this?
Technical SEO | | ScottBaxterWW0 -
Have you used the Addthis Widget and had your rankings drop
Just wondering what experience people have of this widget? I added it to a site I look after late last week and we took an noise dive over the weekend. Any thoughts / comments are appreciated!
Technical SEO | | RodneyRiley0