In order for Google to recognize a hyper-link on your website, does it have to be written in a specific java script?
-
Does it have to read as the following script?
-
Not a problem I find that all too often, if the question is a bit ambiguous - people will ignore it. If there are only a handful of interpretations, I will still try to answer
-
Thank you, that was extremely insightful and helpful.
-
Just so you are aware, the code-sample which you supplied is HTML and not JavaScript (or for that matter, any type of script. Scripting languages include JavaScript, Python, Ruby, Perl etc).
You may be asking one of two things (I think!):
1) Is there a set HTML format for hyperlinks which Google knows how to read?
Yes, and you can find **information all about ** conventional use of the <a></a><a>(HTML) tag here:</a>
<a></a>
<a></a>
HTML is a static language and is not (unlike many scripting languages) 'object oriented'. You don't define "<a>" and as such</a> <a>is not interpreted based upon your programmed parameters.</a> <a>always means the same thing (to a a web browser). Sure stuff like CSS can style links in different ways, JavaScript can modify</a> <a>tags by injecting event-tracking attributes etc (also a common use of jQuery) but fundamentally the usage of</a> <a>is</a> <a>(mostly) universally agreed. So yes - links are coded according to conventions and Google will interpret those widely accepted conventional use-cases, as well as a few more experimental deployments (possibly through error handling in Google's algorithms). In general, you should follow W3C / W3 Schools guidelines. There are many forms of link (no-followed links, text links, image links) and all are valid but yes - they are predetermined</a>
<a>2) This is the HTML which my JavaScript will output - is it ok?
Yeah it's fine dude. If you can handle JS, you can handle HTML (it's way simpler). One thing though, although Google can deploy rendered (JS-enabled) crawling, that involves using headless browsers and such to render the 'modified' source code (so, what you see in 'inspect element' is the modified source. What you see in "view page source" is different, that's the pre-modified or base-source code).
Usually speaking this takes 10x longer than simple DOM / base-source scrapes. As such if Google were to deploy that tech on every crawl for every page on the web, the efficiency hit to their 'index the web' mission would be colossal. Many studies show that Google will not render JS on all sites (especially one perceived to be low value). Even on sites where they will use this tech, they won't deploy it all of the time. There really is no substitute for forcing your links and content to be readable in the base-source code (un-modified). It's way better for crawlers, way more efficient for them to work with. Just because Google ' can' do something, it doesn't mean they always will. It doesn't mean it's a good idea to ignore basic SEO principles!
Hope that helps</a>
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
-
Effects of a bad link linking to a image
i am getting a lot of links from wallpapers sites.. One person has created 1000's of similar sites that are linking back to my images. My guess is images do not pass link value positive or negative. But I am not sure what the potential effects would be. Does anyone know who linking to images might effect SEO especially when there coming from horribly low quality auto generated sites.
Link Building | | KentH0 -
Where can I get a list of broken links to my client's website?
I have a client who owns a website that attracted a large number of links to internal pages of their sites. Without realising the value of those links, they removed every page of their website other than the home pages that now reads, "new website coming soon". How can I get a list of every website still linking to the (now broken) internal pages of their site?
Link Building | | richdan0 -
Could google recognize urls in data-attributes?
Hi, could google's crawler recognize the following example as a link and will be crawl the url? any experience? ty for your help
Link Building | | censeo0 -
Google Webmaster Tools Message regarding unnatural links - how to respond
I acquired a small website which was subsequently hit by Google Panda for unnatural links. Since the previous owner was involved in the link building, I'm not sure what to look for. Here's the message I received from Google: ** Message from Google ** "We've reviewed your site and we still see links to your site that violate our quality guidelines. Specifically, look for possibly artificial or unnatural links pointing to your site that could be intended to manipulate PageRank. Examples of unnatural linking could include buying links to pass pagerank or participating in link schemes. We encourage you to make changes to comply with our quality guidelines. Once you've made these changes, please submit your site for reconsideration in Google's search results. If you find unnatural links to your site that you are unable to control or remove, please provide the details in your reconsideration request. ** End Message from Google ** I'm not sure how to locate "unnatural links" when there are so many pointing to the site. For example, are there specific domains I should look for that are known offenders? Or, should I look for sites that are using obvious anchor text that seems orchestrated? Any insights would be appreciated on creating an action plan. Jerry
Link Building | | JerryCharles0 -
Which link should I use for link building?
I have an article which have high rank on Google. But recent, I use mod rewrite url so this article have new url. old: mywebsite.com/c1/p-1 new: mywebsite.com/c-e/p-1 Now, google is indexing old url. I want to ask when I build linking to my site, which link should I use for link building? I should build linking for new url or old url. Thanks
Link Building | | sonzin13040 -
If I write a PR release on a site such as PRweb with anchor-text links that is picked up and published by other news sites, do the engines consider this duplicate content or additional, beneficial links?
I recently wrote a news release on PRweb that was picked up identically by 8 other news websites, with the same anchor-text links as the original. Is the reproduction of duplicate content and links across different websites like this to the benefit or detriment of SEO and ranking power? Some of the links are: http://www.mynewsdesk.com/uk/view/pressrelease/eventa-new-eventa-christmas-parties-website-is-launched-648923?utm_source=rss&utm_medium=rss&utm_campaign=Alert&utm_content=pressrelease http://www.prweb.com/releases/christmasparties/neweventasite/prweb8562064.htm Many thanks!!
Link Building | | RobertHill0 -
Is there any tool in/or out of SEOMOZ where we can check anchor texts for internal/external links for a website?
I just want to check anchor text of all the links for a specific URL within a website
Link Building | | merkal20050