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 Exchange
Hi everyone, I just started working for a client in a new niche. After reviewing the backlink profiles of his competitors I can see that the top sites are using a ton of link exchanges. They are from really spammy sites too. The kind that will link to anyone that provides a link back. Anyone else seeing much of this?
Link Building | | SixTwoInteractive0 -
Google Link Disavow and sites with extremely heavy but poor link metrics
Need help/opinions from the SEO's out there. I am working with a site that in the past hired an SEO company out of India. Over the course of their time together, this company submitted the clients url to tens of thousands of link exchanges and directories. Around the time of Penguin, the owners told me their inquiries dried up. Literally that same week they had a new website launched (designed by a local competitor) that really butchered the site. They were convinced the reduction in traffic/inquiries was due to the new site but I am convinced otherwise (suspect Penguin). Not only does the site need to be re-structured but their link portfolio needs to be diversified. Now on the plus side, the company caters and sponsors a number of events that earns them organic, relevant links. These are overshadowed by the tons of poor, irrelevant ones though. I read a few posts recently on the Google Link Disavow tool and to proceed slowly due to the unknown nature surrounding it. I have a good idea of what links are problematic and which ones are well served. However, the number of problematic links in my estimation is quite high (thousands). I am very hesitant to dive into Google Disavow and submit such a large number of requests. What are your thoughts? How would you proceed?
Link Building | | mattylac1 -
Outbound links
Hi there, i know inbound links are what hold the main value in terms of link building but if i have an inbound link from a big company such as ITV or BBC and they have put an article on their site linking back to mine, would it be beneficial if i made a comment on my site and then link back to their article or will this not really help? Sorry as you can tell im very new to seo! thanks anthony
Link Building | | anthonybriant0 -
Links from Real Estate Websites Link Page, Do or Don't?
It seems that real estate sites have at times been under heavier scrutiny from the search engines. But real estate agents get networking, which makes acquiring those links a little bit easier. Plus with localization of search, I think real estate sites may give off a good GEO scent. Should SEO's go for links from real estate websites? Does a reciprocal link devalue said links?
Link Building | | Thos0030 -
Forum links
If you are building links in forums how can you decide which forums to post to? Of course you can have a look at averall traffic in Alexa or mozrank but is there anything else you can look at?
Link Building | | sesertin0 -
What link would be better?
Okay, I found a niche blog that has a google PR6. They have a ton of dollow blogroll links, as well as a ton of internal links on homepage. Would I be better off getting the blogroll link? Getting a link in an existing post with a lower PR? Getting an advertiorial written with a link in it? I just don't know. It has a domain authority of 33 currently. It's not a cheap link for blogroll. The in-post, or advertorial isn't too bad, but not cheap either. Thanks in advance.
Link Building | | azguy0 -
Google Webmaster Tools - assessing inbound links
Hello, I am terribly confused by Google Webmaster Tools. I am looking at my inbound links, to see which content on the site is strongest. However, the results from GWT under Links to your site, and the results from doing a link: search in Google yield very different results! For example, in GWT, this page on our site apparently 2237 links from 29 different domains. But when I search link:www.nigelsecostore.com/acatalog/Eco_Stapler.html, I get just three results, two of which are from our site. What is the cause of the disparity between the two results, or is it just my (lack of) understanding of what I am seeing in the Links to your site report in GWT? Any help clearing this up gratefully received! Many thanks, Sophy
Link Building | | sophycolbert0 -
Free link on a Paid Link Blog
Hi there, I have been doing some outreaching, and managed to have a blog post accepted on a authority blog. They included links to my website, and I was very pleased with the placement. However, having browsed through the site, I was worried to see that they openly admit they allow 'reviews' of websites, with backlinks included, for $50 per review. I am worried I might be penalised without actually doing anything wrong. I did not pay for my link, but the link has been placed on a site which openly admits they accept payment for links. Should I be worried? Should I ask them to take it down? To date I have been told countless times by bloggers I am outreaching that if I pay $10, $50, $100 etc I can write a blog post. I have never accepted because of the risk of penalization. Now, unwittingly, I am linked to from a paid link site with a blog post that would look like I have paid for it because of the placement and style of back link. What do you think? Thanks,
Link Building | | giveacar0