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
-
SEO Ranking: Can Child Theme Compete with Custom Theme?
Ranking for New York City commercial real estate is extremely competitive. We compete against: www.squarefoot.com, www.42floors.com, www.Loopnet.com, www.wework.com and a dozen other optimized sites. Our site was designed in 2012. We plan on upgrading it. From an SEO perspective, can we compete by purchasing a Wordpress real estate theme and customizing it into a child theme? Our better ranking competitors are using custom themes where the code has been very streamlined to make the sites quick and easy to index by spiders. Would we gain a significant edge by custom coding? This is somewhat technical for a business owner and I am trying to get my head around it. Our existing site is www.nyc-officespace-leader.com. Some of the themes we are considering are: -http://main.wpestatetheme.org/homepage -http://houzez01.favethemes.com/ -http://realhomes.inspirythemes.biz/property/ From an SEO perspective is creating a child theme from the above a good approach? Or will a custom theme give us an advantage. If there is an advantage is that edge so marginal that it is not significant? In terms of coding, is a custom site much more labor, 2x, 3x the time to code? Also is the maintenance of a custom site much more involved? Also, as a related question, my developer since 2012 has created many custom plugins for Wordpress. Is this a no, no? Will avoiding custom plugins add to the development cost? Even if we use a child theme from an existing real estate website, I would hope that the improved user interface will provide a boast in at least conversions if not SEO. Thanks, Alan
Web Design | | Kingalan10 -
What is the best way to employ log-in to benefit in SEO?
Hi all, All SaaS companies have this log-in page as their top visited page in their websites and some times it helps and also hurts them. I've gone through some big SaaS companies websites and they handle the log-in page differently like on sub domain, on website page, some will directly link to their instance login without a page, etc...I wonder what is the best practice to host the log-in to make sure the more visits to log-in page don't hurt us but give us some boost. Thanks
Web Design | | vtmoz0 -
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 -
Free websites that are good with SEO?
Dear members, I am looking for a free/ almost free website which is good for SEO. For example i am looking at WIX right now but i keeping reading that they aren't optimal for SEO. Does anybody has some tips which website is can use, example weebly, strato, etc?? Many thanks!
Web Design | | rijwielcashencarry0400 -
What are some of the best Word Press themes for SEO?
Does anyone have any suggestions on the best wordpress themes to use? Here is one that has been recommended to me before: http://www.smallbiztheme.com/
Web Design | | webestate0 -
What is the difference of HTML5 and web 2.0? What is web 2.0 and is this better for seo?
A little bit confused with the new stuff. The web 2.0 webpages are so much better? What changes?
Web Design | | Naghirniac0 -
Infinite scrolling - is it SEO friendly ?
If i am trying to implement infinite scrolling and remove pagination completely, will it effect my SEO ? Why or why should not infinite scrolling be implemented ?
Web Design | | Myntra0 -
Mozcon London 2010: Top 10 tips - Design for SEO PPT Not Available for Download!
Hi - title says it all really! Just watched the video and throughout it they refer to the wireframes/site examples being available via the ppt download. However, even as a PRO member having purchased the DVD bundle I cannot find a link to download the presentation. Can anyone help please? Thanks in advance!
Web Design | | BlakMajik0