Script tags and seo
-
Hi,
I have a page on my site with a google map embed, and a path drawn on the map. The path is made from a long string of coordinates. For ease I have the co-ordinates placed in a script tag at the foot of the page, amongst my javascript
My question is, will this script tag hurt the seo for the page? I've read that inline js and 'data islands' can be bad, so I've been careful to keep it out of the main body of the page. Thanks, any help appreciated!
-
Inline scripts aren't bad per se, search engines just can't always understand them. Worst case scenario: you have extra code that Google has to crawl but doesn't understand, which takes up bandwidth and doesn't add value. But, it won't lower your rankings.
So, do whatever you need to do to deliver the best user experience you can on your site with this map and related route, and figure that Google will ignore it (Google is trying to understand it, though, so it may be helpful in the long run). Then, for search engines, include some text content describing the map and the route so that search engines can send the right searchers to your page.
Good luck!
Kristina
-
Okay great, that's very helpful.
What if I wanted to have multiple scripts, say, for points of interest along the route, and had multiple (20+) tags at the bottom of the page? Would this be an ugly way of doing it, or considered totally okay in the eyes of google?
-
Yes, that's an inline script (putting it at the top or bottom will still be inline), but as I said, if only one page is using that script, you are good to go. There's nothing bad in using inline scripts if they aren't going to be used on other pages as well.
-
Thanks Federico.
As my script is being called at the bottom of the page, I would assume it doesn't count as 'inline'?
Yes the scripts are only being used once on specific pages.
-
Inline scripts are bad if you are bringing them on every page, if that's the case, just use scrip embedding so users don't need to download the scripts EVERY time they see a page.
But, if the inline script is used only on a specific page and not reused, then there's no reason to load it as an external file. In my opinion, that will even need an extra server call to bring a code that only works on that page.
Hope that helps!
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
-
Best SEO-friendly CMS platform?
I have been tasked with rebuilding a small e-commerce website using a CMS, but I'm not sure which one has the most SEO compatibility. One SEO company recommended Squarespace. Another warned me against Squarespace because of its limited SEO features and instead recommended Wordpress with the WooCommerce toolkit. I've also heard Drupal and Joomla mentioned. Are certain CMS platforms more SEO-friendly? If so, what are the best ones that can also handle e-commerce? Thanks!
Web Design | | businessimagesolutions1 -
Does blogger.com stink for SEO purposes?
Three different SEO guys suggest moving my blog to another platform. " I think migrating to a more robust CMS platform like Drupal or Wordpress would be a wise decision." But, they never say why moving would benefit SEO. My blog is on a custom domain, has lots of original content and has decent organic traffic to begin with. I think I have other SEO issues to deal with before bothering with a new platform. Does blogger stink for SEO? Why?
Web Design | | Eric_haney0 -
Title Tag Suggestion
Short title tag is more useful so if we just use our targeted keyword in home page title then is it useful.? for example my website: http://www.topnotchlawsuitloans.com/ i am targeting lawsuit loans keyword so if i use <title>TNF - Lawsuit Loans | Lawsuit Funding</title> is batter to use for main page or <title>Lawsuit Loans | Lawsuit Funding | As Low As 1% | PreSettlement Funding</title> can we have to use main targeting keyword on all webpage title tag ? my website have 200+ page and i have to use different title tag for that pages including targated keyword so if i am targeting lawsuit loans in that title, what is best to divide title pipe, hyphen or comma ? does capitalization in title tag wrong effect ? Lawsuit Loans - As low as 1% Lawsuit Loans | As low as 1% Lawsuit Loans, As low as 1% (or i have to use smaller cash in title) for all different page i want to place this kind of title is it best for SEO purpose Lawsuit Loans - Lawsuit Loans Fargo Lawsuit Loans - Lawsuit Loans Escondido Lawsuit Loans - Lawsuit Loans Erie Lawsuit Loans - Lawsuit Loans Flint Lawsuit Loans - Lawsuit Loans Fort Wayne Lawsuit Loans - Lawsuit Loans Fresno Lawsuit Loans - Lawsuit Loans Gainesville Lawsuit Loans - Lawsuit Loans Grand Rapids Lawsuit Loans - Lawsuit Loans Gilbert Lawsuit Loans - Lawsuit Loans Gresham Lawsuit Loans - Lawsuit Loans High Point Lawsuit Loans - Lawsuit Loans Hialeah Lawsuit Loans - Lawsuit Loans Huntsville if i am using this kind of different title for all page then it can effective for SEO or it will be come in keyword stuffing
Web Design | | JulieWhite0 -
White Text / Black Background & SEO Impact
Does anyone know of any testing / studies with evidence that Google prefers dark text on a light background vs. light text on a dark background? I have a website that currently has light text on a black background, and really like the way it looks, but am concerned that the style may be hurting SEO. Moreover, redesigning something inverse with the same quality would be a large project and fairly costly, so I'd like to make sure the benefit will really be worth the cost before moving forward.
Web Design | | Bromtec0 -
On site SEO opinions
Hi all, I have been testing different configurations for my on-site SEO for a while now and I think I am pretty much there. However it is always nice to know what other SEO's think about my keyword density and usage. My site is http://www.tomlondonmagic.com I am curious as to what you think regarding landing page content, whether you need lots or text or little text? I have just removed links in the text as I feel I want to keep as much juice on my landing page as possible. Thanks all!
Web Design | | TomLondon0 -
How does a Responsive Site kill SEO?
How does a Responsive Site poentially kill SEO? I've seen a few feeds on twitter how a website took a rankings dive after implementing a Responsive theme; yet, it's not clear to me what is actually going on within a Responsive site that would cause the SEO rank to tank? I can only speculate that it introduces a bunch of 404 errors, or that it changes all of the URLs into gibberish, so you loose all of the links coming into your website if not 301'ed? Can someone clarify, what are the actual mechanical issues on a Responsive website that becomes a concern to SEO? Thanks.
Web Design | | ExploreConsulting1 -
Help choosing an E-Commerce platform for SEO, Product Videos and Usability today?
7 months ago I asked the same question.. I am reaching out to all of you What platforms do you hate? and want to meet the guys or girls that coded it in a dark ally way... and What platforms are good? I keep looking at the code of some sites and its shocking. No GA Async code, No canonical tags.. it goes on and on.. If you want to pitch to me and you are in the UK email me [email protected]
Web Design | | robertrRSwalters0 -
Is my company's privacy policy diluting our SEO efforts?
Good morning! I'm new to the SEOmoz community. This morning, I spot checked a couple pages using the Term Extractor. When looking at the results, I noticed that we're ranking for many of the terms contained in our privacy policy. Our privacy policy is set up in the footer of our page templates and appears as a light box that pops up over the page you're viewing, so it looks like every page (from a search engines perspective) contains every word of our 900-word privacy policy. Since several of our legal terms are showing up as "targeted terms" within the tool, would it benefit me to change the privacy policy link from a light box to something else? Perhaps a link to a static page that contains our privacy policy instead? Are the search engines smart enough to see the repeating text and ignore it from page to page, or am I just diluting all of my SEO efforts here? I'm after big wins here, and don't want to be too nitpicky, but concerned this could be a big SEO no-no that I might want to correct. Thanks in advance for your expertise! Ben Culbert
Web Design | | SheriGolla0