Boston Web Marketing Logo

How to Carefully Manage Your Javascript for SEO

There are so many facets of a website that can have an impact on their SEO. The structure of a website (or the HTML) can give Google the hierarchical structure of what to crawl on the site itself or the content available on it. The design-centric CSS can positively impact a website’s speed and can also allow designers or coders to use less HTML code, making it easier for a bot to crawl. Java, on the other hand, is all about functionality and user experience. Structure and imaging can become more dynamic and interactive. And while it’s easy to just assume that this is only good from a UX standpoint, there actually some great SEO benefits that come with consistent Javascript on a website. It’s a wonderful tool to use, albeit a little complicated at times, especially from an SEO standpoint. If used correctly, your site will flourish for search engines. With that in mind, here’s what you need to monitor closely when making your Javascript SEO friendly.

Crawlability 

You need to be able to showcase your site’s Java to bots that will crawl your site. You want the bots to see what users on your site are seeing. If bots can’t see the Java code itself but can detect something other than the usual HTML, chances are they’ll consider it “blocked content” which could negatively affect your search results. Be sure that bots can crawl the javascript code on your website before placing it on there. To see if your script is crawlable, try using a tool such as robots.txt or Fetch As Google.

Internal Linking 

Internal linking continues to be a wonderful asset for those in SEO, whether it be for adding images with keywords for alt text, or video. Javascript is no different. Taking the code for Java and placing it within an internal link will help bots identify the content within the HTML and process the “experience” that the script provides. The most conventional way to incorporate java into it is to write out an <a> tag and place the script between the tag and </> tag (in this instance </a>). By doing this, bots will be able to recognize the script within the link and crawl it. 

URL Structure 

Aspects of the URL that Java has are not seen as crawlable by bots. This usually involves a hashtag, or a “#”. In best practice, be sure to remove these when placing the javascript code. Another way Java can make itself identifiable in URLs is when it is displayed in a URL as “#!”, or a hashbang. Again, this is another way to keep the url from being crawlable for bots. Try keeping these out of the final url once they have been created. 

Contact Boston Web Marketing today to discuss SEO strategy for your company. We look forward to maximizing your website’s potential. Give us a call today at (857) 526-0096.

Recent Blog Posts

Contact Us Today!

  • This field is for validation purposes and should be left unchanged.