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
-
How to use icons for iOS, Android & windows home screens?
Hello All, Which are the latest icons' dimensions for IOS, Andorid and windows home screens? Can you please guide me and way form implementing it? Thanks!
Technical SEO | | Johny123450 -
Pros and Cons of using rel=next on blog posts
Hi there, at the bottom of my website's blog posts the rel=prev and rel=next tags are used on links that point to the previous article that was posted and the next article that was posted. Often these articles are not 'linked' in terms of their content or message. Is this the correct use of rel=next/prev and if not what are the possible negative effects. Many thanks.
Technical SEO | | Bee1590 -
Use of multiple keywords that are similar for one local site
Hi I thought that if I wanted to rank a local site for the core Keyword, 'Landscaping Location' that variations of this keyword should be used on the same page. But I recently read that if I wanted to rank for: Landscaping Location
Technical SEO | | CamperConnect14
Landscaping in Location
Landscaping Services in Location that I should use separate page for each term. Is this correct? A small local website will probably only have a few pages and so making up pages solely to go after Keywords can't be right. But then would opportunities be missed? Thanks for your help with this!!0 -
Is blog.example.com ok for seo benefits?
our blog is currently setup as blog.example.com is this OK for seo benefits for the main domain example.com? is there any benefit specifically for the domain level by having the blog set-up as example.com/blog? would it be worth the effort to do this on a large blog? thanks
Technical SEO | | Direct_Ram0 -
Should you use the keyword for your page in an image?
Hi there! I am currently working on building up the SEO ranking on a page using a specific keyword - dresses. Within this page, we have an online image library full of dresses which are then added to multiple pages determined by brand, colour, type etc for people to search. I am adding hundreds of images all of dresses - I wanted to know if I name these images using the keyword: for example 'dresses_1, 'dresses_2' - will that have a knock on effect on page I am trying to build up and optimise for the keyword 'dresses'??? Any help is appreciated.
Technical SEO | | Jaybeamer0 -
How to target similar keywords for Main Category / Sub Categories?
Hi all, This is from an on-site point of view for an ecommerce site - Just looking for a bit of advice about how i can create different pages for similar keywords, by this i mean lets say i have 4 categories: Main Category = High Definition Sub Cat 1 = High Definition Camera Sub Cat 2 = High Definition Recorder Sub Cat 3 = High Definition Kits First lets focus on the Main Category: Would you not want to mention Camera / recorder / kits in any of the main category title / meta tags / h tags etc? From a navigation point of view its impossible not to have those words mentioned there, and from a product point of view obviously the "cameras" are going to be on the main category page also... Obviously we can create some written content also, which i presume again would be best not to mention cameras / recorders / kits? OR would it be wise to mention them, but link to those pages? NOW if we look at a Sub Category - Say 1 (Camera) Now obviously everywhere we type in "high definition camera" we are typeing in the keyword for the main category, so is there anyway to limit the effect of this, so that a sub category wouldnt rank above a main category for its keyword... for example if we were to make sure any time the word "high definition" is mentioned in title / meta / h tags, or any specific written content that the word "camera" is directly after it... Also, perhaps in the content of all three sub categories make sure 1 (or would you advise more) link to the main category using keyword "high definition"? Any advice on the above would be greatly appreciated... Also bare in mind i am talking about on site only, i'm just thinking from a creating the page point of view, i know we can try and force the issue afterwards with a few backlinks etc.. On a different note, a simple question... When you do a site:mysite.com search in google... is the list google then presents you in order of how "important" googls see's the pages on that site? Or is it just hompage then random? thanks James
Technical SEO | | isntworkdull0 -
Do the engine spiders see this javascript?
http://www.drsfostersmith.com/general.cfm?gid=259 I'm looking at building something like these banners, and wondering if the engines a) see b) value links like these in the drop-down selector? I guess I could test it but wondering if anyone else has before I do it.
Technical SEO | | ATShock0 -
Using Drupal to Author Websites across 2 Domains
I am new to Drupal and as an organization we are considering using it to author both our corporate site and our blog. In the future we'd like our blog to live at a separate domain and I understand Drupal is capable of publishing across 2 domains. Does anyone know of any SEO implications to this type of infrastructure set up? Are there specific things to be mindful of when setting up the Drupal CMS across 2 domains? thanks for the assistance!
Technical SEO | | Hershel.Miller0