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
-
URL Structure's Effect on SEO
Hello all, I have a client who currently has a very poor URL structure. As it stands, their URLs are formatted in the following manner: http://www.domain.com/category/subcategory/page In all my years of SEO, however, I have always tried to implement the following format: http://www.domain.com/category/page The web designer for this particular project has been very reluctant to change the structure for obvious reasons, but I'm convinced that by modifying the URL structure, SEO will improve. I am correct in thinking this? Likewise, if I am able to get the URL structure changed, what do I need to look out for to make sure we don't lose any traction for our keyword terms? Any and all insight/suggestions is greatly appreciated. Thanks for reading!
Web Design | | maxcarnage0 -
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 -
Is this CSS solution to faceted navigation a problem for SEO?
Hi guys. Take a look at the navigation on this page from our DEV site: http://wwwdev.ccisolutions.com/StoreFront/category/handheld-microphones While the CSS "trick" implemented by our IT Director does allow a visitor to sort products based on more than one criteria, my gut instinct says this is very bad for SEO. Here are the immediate issues I see: The URL doesn't change as the filter criteria changes. At the very least this is a lost opportunity for ranking on longer tail terms. I also think it could make us vulnerable to a Panda penalty because many of the combinations produce zero results, so returning a page without content, under the original URL. This could not only create hundreds of pages with no content, there would be duplicates of those zero content pages as well. Usability - The "Sort by" option in the drop down (upper right of the page) doesn't work in conjunction with the left Nav filters. In other words if you filter down to 5 items and then try to arrange them by price high to low, the "Sort" will take precedence, remove the filter and serve up a result that is all products in that category sorted high to low (and the filter options completely disapper), AND the URL changes to this: http://wwwdev.ccisolutions.com/StoreFront/category/IAFDispatcher regardless of what sort was chosen...(this is a whole separate problem, I realize and not specifically what I'm trying to address here). Aside from these two big problems, are there any other issues you see that arise out of trying to use CSS to create product filters in this way? I am trying to build a case for why I believe it should not be implemented this way. Conversely, if you see this as a possible implementation that could work if tweaked a bit, and advice you are willing to share would be greatly appreciated. Thanks! Thank you to Travis for pointing out the the link wasn't accessible. For anyone willing to take a closer look we can unblock the URL based on your IP address. If you'd be kind enough to send me your IP via private message I can have my IT director unblock it so you can view the page. Thanks!
Web Design | | danatanseo0 -
How to know if a wordpress theme is coded correctly for Seo
Hi, So I am curious if there is a tool to see if a site is coed properly for Google? I am running Avada, a standalone theme, yet I am also using a cache plugin. But when I search my code, its all like on one huge line. So I am curious if there is a way to verify or check if a theme is coded correctly? Thank you
Web Design | | Berner1 -
Is the 'too many links' caused by the tags?
Hello Just got my seomoz report and decided I better start takiling things. Got a lot of 'too many links' on the report. I don't have control over website design and before I talk to designer I thought I should have a bit of an handle on what I am talking about. I've taken one page that has 483 links. Is this caused by the tags box and would it be a good idea to have it removed? http://commonwealthcontractors.com/uk-visas/tier-2-general-visas-formerly-uk-work-permits/ Regards Niamh
Web Design | | Niamh20 -
Websites with only one "html file" and page href # is good for SEO?
I bought one website from templatemonster that contains only one HTML and the pages are generated by links (PROGRAMACAO) My website: www.nextformaturas.com.br This is good in term of SEO? or it is better an website with deveral pages with diferent contents? What are the pros and cons? I really lost on this.
Web Design | | Naghirniac0 -
What is the best SEO friendly CMS platform?
Would like to build some content sites and would appreciate some guidance on what you believe to be the most SEO friendly CMS platform. I'm also hoping to find something that doesn't require much HTML and is pretty easy to jump into.
Web Design | | EdStaton0 -
Local SEO - Title Tag?
For www.bluedotlandscaping.com/fencing.htm in which we mostly only care about Greenvile and Spartanburg counties in SC. Is <title>Patio designs - Water features - Brick patio by Blue Dot Landscaping</title>
Web Design | | SCyardman
good... or or do you prefer... <title>Patio designs - Water features - Brick patio - Greenville, Spartanburg, Simpsonville</title> Thanks for your help, Rich0