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
-
Is it a good practice to get link for your original page by shorter URL links
Hello Moz Community, I have a question regarding getting links on bitly, tiny, or an other url shortner, Is it a good practice to get link for your page by shorter url I mean lets suppose i am getting natural guest post link from content for my blog home page
Link Building | | JoeySolicitor
https://coupontoaster.com/blog/ ; and shorten it with bitly and then hyper link so is it a good practice am I getting the same power and SEO consideration as if i would have done this without url shortener. And what anchor texts shall i be using like rich anchor text or any other like click here, visit here, bitly or etc Please kindly help me with this thanks1 -
Connecting Two Websites Without Upsetting Google
I have a question that I think I know the answer to, but want to cover my bases. We have a successful blog and are creating a second similar blog for a more specific type of reader. We want to backlink between content because it makes sense for the reader. Our fear is that we may come off spammy to Google by having so many backlinks. Is there a way we are able to tell Google these two sites are related so they don't penalize either site for anything?
Link Building | | HashtagJeff0 -
More than one link on an external website
Just wanted to clarify my understanding of this... I'm of the understanding that if an external site has more than one link going to your site, then it is only the one link that passes value. If this is the case.... Which is the link that passes value (i.e the first link established or the link that, all factors being considered, is the most valuable for passing authority?) If a second link established on an external website comes from and goes to a different webpage than the first (and is done for the purposes of targeting and boosting a different keyword category/theme), is this then a beneficial practice? If multiple links on an external website all serve to generate solid referral traffic, will this boost rankings, and thereby be a sound practice? Thanks in advance for your help in clarifying this for me!
Link Building | | Gavo0 -
When buying used domains, how do i see the links pointing to that domain? OSE not showing links
when buying used domains, how do i see the links pointing to that domain? Sometimes the open site explorer doesn't show any links to the domain, especially if the domain is parked. Obviously a domain for sale with 1000 domains linking to it has lots of SEO Value right? Thanks mozzers!
Link Building | | Ron100 -
Drop in "Links to your site" in Google Webmaster Tools
Last week I noticed a substantial drop in "Links to Your Site" in Google Webmaster Tools on several of my websites. Upon further investigation the reduced links were from our sister sites. It appears that Google has reduced the number of links they are counting from links in our headers and footers from these sites to our main websites. It is not affecting our rankings or traffic. Is Google doing some clean up with what they are showing in webmaster tools for links from related, owned sites? Any cause for concern?
Link Building | | tdawson090 -
How long does it take for crawlers to update links? As in number of back links
How long does it take for crawlers to update links? As in number of back links
Link Building | | tom14cat140