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
-
Why are bit.ly and ow.ly links showing up as Inbound Links?
Hello! I noticed this question was asked a while back (around 2013 i think), but I still don't quite understand why I'm seeing these shortened URLs come up as Inbound Links? Can someone please explain? Thanks,
Link Building | | txwildcard
Carlos0 -
Subdomain links vs root domain links? Are the less valuable?
I am determining the value of links we get. Is a link on a subdomain less valuable vs one on the root domain? How less valuable would you consider a subdomain link? For example blog.site.com vs site.com/blog What other metrics would you take into consideration for the value of a subdomain link?
Link Building | | calf0 -
Is it there a diminished benefit from having multiple links from websites hosted on the same server?
Looking to link to a website from other relevant websites. However, these websites are all hosted on the same server. We know that Google looks for diversity when it comes to varying websites in determining link value and authority, however, what about the case of diversity in the case of websites on different servers? Does this even matter? Any insight here would be most appreciated!
Link Building | | Gavo0 -
Multiple Links from High Ranking Site Vs. Links from Multiple Domains - What's More Important?
I understand it is important to get links from many quality domains. Currently, I do have links from top domains (PR, Trust) and it I can get more from (high rank) pages on these same domains. Would it be better to focus on expanding my reach (find additional domains to link from) or to continue to build links from the current domains I have a connection with? What is weighted more? I realize doing both is important, but trying to figure out how to best use my time. Thanks! David
Link Building | | DWill0 -
Google webmaster tools Who links the most updates?
Has anyone ever seen in the section in GWT "Who links the most" actually update. I have sites listed in there that had me on a blogroll so I had 93,000 links to me and they removed those links months ago but GWT still shows that number of links. Does anyone else actually see those numbers go down as links are removed?
Link Building | | cbielich0 -
There are penalties by Google for the purchase of links? If yes which are the penalties ?
There are penalties by Google for the purchase of links? If yes which are the penalties ? When we buy links how to see if the site is considered as salesman of link by Google? Thanks you
Link Building | | elitepronostic0 -
Many competitor's backlinks are in content anchor links. Ho do I get these same links?
Hi I managed to open up OSE. I'm finding that much of the competition's backlinks are in content anchor text links. Am I supposed to get backlinks from these same pages using the same anchor text but linking back to my page or is that allowed? If so, how do I get these in content blog post links? Thanks. Sunil.
Link Building | | sunilmuse0 -
Where to start on building links for a news website? Should I focus on promoting individual articles or create linkbait and create friends with influencial bloggers/editors/ and news websites in the same niche?
Where to start on building links for a news website? Should I focus on promoting individual articles or create linkbait and create friends with influential blogger/editors/ and news websites in the same niche?
Link Building | | purch0