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
-
Link Building where link building is dead. Latest tactics in a land of content.
Hello, What is your latest link building techniques considering manual link building is basically dead, and you should really build good content to drive results. Link building has really become less important. It seems to be much more 10X content now. What would you recommend for basic link building considering this besides the 50 first Links video by Rand, which is excellent. Thanks, Bob
Link Building | | BobGW0 -
Internal links: How do I find keywords that are not linked to a URL?
Hi Moz members I'd really like to place an internal link of every instance of an important keyword phrase "cycling caps" or "cycling cap" to my eComm category page
Link Building | | andystorey
https://www.prendas.co.uk/collections/headwear/cotton-caps I feel this would not only help my customers browsing my store, but I believe it will help from an SEO perspective. How can I search my site using Moz, Screaming Frog, Google etc to find every time cycling cap(s) is used but is not linked to the above URL? I can then apply the same for cycling jerseys, socks, etc Andy0 -
Backlinks vs External Links vs Referral Links vs Outbound links
Hello all, I was just wondering if you could explain the difference between all the links above? I'm confused as they all seem to be the same or similar and I would just like to clearly know what distinguishes them from eachother. Thanks for your help, Jayne
Link Building | | NCOREGSEO0 -
What are the SEO implications of high quality backlinks from US-based websites to UK-based websites?
Hi everyone, quick question I hope someone could help me with: We're representing a client based in the UK. As part of their overall strategy we've been linkbuilding. At the moment, about 80/90% of the links we've gained come from UK-based sites, with 10/20% coming from US-based websites. The US based websites are very good (think New York Times and genuine, relevant blogs with good readerships). An external search analyst/consultant has contacted the client to say that the US links will be harming the site, because the links are from websites in the US and not the UK. We believe that if 80/90% of the links were from the US this could indeed cause harm as it could indicate to search engines that our client is in the US when it's not (which might compromise their chance of ranking in .co.uk versions of search engines) however because it's only 10/20%, and because the linking sites are very good, we believe that they will getting all of the benefits of the positive metrics without any meaningful negatives. We just wanted to get a few opinions on this to see if people think that we're mistaken, and would be glad to hear any opinions contrary to our own.
Link Building | | GoUp0 -
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 -
Internal Links - First Link Rule Confusion
Hello All - I would like to create a guide for my team of rules for internal links and I could use some help. My understanding is that Google only counts the first link to a page, so any crafted keyword text links within the content do not count if the page in question is linked to from the main navigation. Is this correct? For example, if the menu or drop down menu in main site nav (which exists on all pages of the site) includes a link to a particular section that will be the only one that ever counts since the menu is on every page? Example: let's say a website selling cat toys includes a drop down menu on the homepage with links to "holiday cat toys". Does this mean that no other text links in content on the site will support that page from an SEO perspective since the link is in the main nav and will always be the first one counted? In the past we have added text links in the content on the homepage to important pages on the site. It seems to work, though now I'm questing these tactics based on the first link rule. I would appreciate some advice, clarification, thoughts, etc. Thanks!
Link Building | | JBMediaGroup0 -
Do links to my website improve all pages?
I'm currently building links to my home page (through directories) and blog pages. However, none of these pages are actually targeted pages for main keywords. In SEO, do links to any webpage of a site contribute to the improved rank of other pages?
Link Building | | Gavo0 -
Why is OSE not showing Google+ bio link in backlink profile?
Hi fellow mozzers I wonder why opensiteexplorer (ose) isn't showing Google+ bio links in backlink profile reports of websites that get a link from the "about" page of a Google+ account (+ contributor link). Thanks for sharing your thoughts. Jacob
Link Building | | Jacobe0