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!
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
-
How do elements that are displayed when scrolled impact SEO?
Hi, We are wanting to implement Animate.css and Wowjs on our site and were concerned about the SEO impacts. Basically when the page is loaded, if the element is not within the viewport then the HTML tag (i.e. div tag) have a style="visibility: hidden" and once the element is within the viewport it will change to have style="visibility: visible". Would having the style="visibility: hidden" negatively impact SEO?
Web Design | | KendallHershey0 -
Magento Category H1 Tags
I am currently using magento and have all titles labeled correctly. I have made a H1 tag for the main page which works fine. Each product title becomes and H1 tag, which again is fine. However my category pages are missing H1 tags. If I manually code an H1 tag, then there becomes 2 H1 tags. It is using my category name then my manual H1 tag. I don't want it to use my category name because it is shortened to fit on my navigation bar.
Web Design | | nchachula
Ex. www.mydomain.com/tshirts/short-sleeve
In this example the subcategory title is short sleeve. When using MOZ tool on frontend it shows NO H1 tag or the title becomes H1 tag "short sleeve" however I want the H1 to actually be "short sleeve tshirts"
If I manually add an H1 tag to description on category page it adds both the title AND the H1 tag I enter.0 -
Can anybody recommend a good UK based SEO
Looking for a company or person willing to work on a small company website in other words not expensive 🙂 I looked on the recommended list on the MOZ website but they mostly in America and mostly only too willing to work on large company websites. There wasn't anything catering for a one-man band business like mine which is letting holiday cottages www.endeavourcottage.co.uk. I have just started talks with a responsive web designer, but if I got the right SEO company maybe they could do both but not necessary.
Web Design | | WhitbyHolidayCottages1 -
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 -
Pages vs. Posts for SEO
Hi, I would like your thoughts about pages vs. posts for SEO. I understand the difference in terms of WP structure and have read the SEOmoz blog post about setting up your site for SEO success (http://www.seomoz.org/blog/setup-wordpress-for-seo-success). However, if you're trying to rank for a particular keyword, it seems that either one could work, from an on-page SEO perspective, as far as title tag, URL, meta description, etc. So how do you decide whether to set up a page vs. a post? What are the pros and cons, from an SEO perspective, about using one vs. the other? Thanks in advance! Carolina
Web Design | | csmm0 -
What is the best information architecture for developing local seo pages?
I think I have a good handle on the external local seo factors such as citations but I'd like to determine the best IA layout for starting a new site or adding new content to a local site. I see lots of small sites with duplicate content pages for each town/area which I know is poor practice. I also see sites that have unique content for each of those pages but it seems like bad design practice, from a user perspective, to create so many pages just for the search engines. To the example... My remodeling company needs to have some top level pages on its site to help the customers learn about my product, call these "Kitchen Remodeling" and "Bathroom Remodeling" for our purposes. Should I build these pages to be helpful to the customer without worrying too much about the SEO for now and focus on subfolders for my immediate area which would target keywords like "Kitchen Remodeling Mytown"? Aside from my future site, which is not a priority, I would like to be equipped to advise on best practices for the website development in situations where I am involved at the beginning of the process rather than just making the local SEO fit after the fact. Thanks in advance!
Web Design | | EthanB0 -
Having a new website build, what happens to my SEO work?
Hi, We are in the process of having a new website developed by a web agency. New domain, new business name etc... What is the best process to transfer from old domain to the new one? What happens to all my ranked URLs? What can re-directs do to help me? Will I loose all my link juice on highly ranked keyword domains? I ranked 1st for a brand now, wil lthis go? Any advice, help or hints would be great. Thanks Will
Web Design | | YNWA0 -
Will A DHTML Overlay Or ThickBox Capturing Email Hurt SEO?
Some of our competitors use an overlay window on all their pages to sign a customer up for an email list (usually offering a coupon). Our questions is related to the impact on SEO the overlay might have. Does anyone have experience doing this and is this a "safe" thing to do related to SEO? Thanks...
Web Design | | onlineinitiatives0