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>
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
-
Can i link my two websites
Hello , I have two website in the same domain but for 2 differents country. Can I put a link in both of them? If yes, should the links be NO follow? here is the two websites : https://gebetszeiten-kalender.de/ , https://preghiera-orario.it/ Thanks in advance
Link Building | | islam2france0 -
If your website is mentioned on an external site does it matter the amount of people who click on the link to your site to improve your domain authority
I want to know about link building strategy and does it matter the amount of times someone clicks on link on to your site from the external site to affect your domain authority
Link Building | | SimplifyValetStorage0 -
Am I better off with ten links from one site or one link from ten sites?
I am writing a series of linked-back articles for a highly-ranked web publisher, but wonder if I'd be better off sharing the articles across different sites. My goal is to grow our domain authority and SEO rankings.
Link Building | | Lysarden0 -
Back link from site with DA of 72 to a website domain. Clicking on the link redirects to our website not the attended one.
Hi,
Link Building | | JIMBO16
I've ran a back link check and discovered a good back link to a site which then gets redirected back to my company's website. I have a feeling that an old SEO agency has purchased a small website which has a decent link back from a relevant organisation with a high Domain authority and then redirects the domain to our website to get the link juice. What are your thought on this? Is this really bad practise and possibly damaging? Thanks, Jim0 -
Large natural products website owns education website. Should relationship be disclosed?
Hello All - I'm working on a content strategy for a large natural products company. In general it's difficult for articles about the natural products industry written written on commercial company sites to show up in the SERP. Most of the results come from large educational sites and blogs with no obvious affiliation (or products for sale). This company also owns an educational site - one that would be much easier to get content on the first page of the SERP for. The 2 sites are hosted on the same server. My question is - does this website relationship look fishy? Is it a grey area to create content for the educational site - content where the purpose is #1 education, but #2 - to promote products from the main site and send traffic to the main site. I do think it's important to note that the main company site does not actual sell any products there (products are sold on Amazon and on shelves in stores). I appreciate your thoughts!
Link Building | | JBMediaGroup0 -
Ranking a specific inner page for a specific website
Hi, I'm new here and it's my first question. I'm not so new in SEO, the thing that I know now is google has changed its game plan. lol. My question is: I have a specific website (aged website but not well-optimized overall), and I want the inner page (with good on page optimization for a certain kw) to rank for the main kw that it's optimized for. How to do this these days? Should we build more kw to this page like usual? If yes, then what best practices to do it? thx guys
Link Building | | martino8880 -
OSE shows links on sites but can't find links
Hi mozzers, I'm cleaning up our backlink profile and looking up anchortexts in OSE. I downloaded and selected one anchortext. However when I go to the sites OSE found, I can't find the links. I look in the source code and onpage keywords. Is it because of my lack of skills that I can't find the links 🙂 or isn't OSE working properly.
Link Building | | StephWeigert0 -
Outsourcing Link Building - What Low LEvel Links Should One Start With 1st
Outsourcing Link Building - What Low Level Links Should I start with if my interest is get free immediate traffic as a direct result from placing links or what ever out there and what should I outsource 1st and why ? What questions should I ask my self that will help me determine where I should start with low level links ?
Link Building | | helpwanted0