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
-
Do changing theme would cause the the seo effects?
I want to ask that i want to change my website theme does this will have any side effects on my humidifier site Seo?
Web Design | | farhankhan110 -
Non-wildcard SSL risky for SEO?
I have a potential client who doesn't seem to be using wildcard SSLs in a multi-site scenario (over 40 sites) - what I'm wondering is the scope of Google's inspection of a site's SSL in this case: https://www.domain.com (good to go) https://domain.com (certificate error) Will Googlebot/Google possibly consider the entire TLD insecure? Could the secured, www-version of the site end up with the "Site is not secure" message in the SERPs as well? Could this invisibly affect the client's rankings? PS: Yes, I know that the right thing to do is go wildcard, but I need an answer to this before recommending a large purchase to them.
Web Design | | scottclark0 -
Wow, does a website's hosting company have that much affect on SEO?
As a small SEO agency, we also handle hosting for some of our clients. Our clients' sites are Wordpress. We set them up with a Bluehost account with a dedicated IP address, and spend a lot of time focusing on load times (implementing a CDN, optimizing images, installing W3 Total cache and using recommended settings, etc.). Last month, we had a client inform us that they are bringing their web marketing efforts in-house, so they switched to a new hosting provider and took their (existing) site to the new hosting company. They kept their old Google Analytics code installed, so I can still see how much traffic they're getting. Since switching to a new host, despite the load times taking longer, no CDN, and other errors that came up prior to us spending time "optimizing" the website, their organic traffic has increased by 26%. Same exact website, same inbound link profile. According to Webmaster Tools, their impressions and clicks have also seen dramatic increases. So now, obviously, I'm considering looking into other options for the hosting of our other clients' websites. From your experience, and especially when it comes to Wordpress websites, do you think that a hosting company can make that big of a difference in terms of SEO? I've heard of positive results from people who have used WP-Engine, and other Wordpress-dedicated hosting companies, but I just find it hard to believe that we spent so much time on load-time-specific ranking factors and come to find out, a different hosting company would have made a huge difference. Any thoughts/feedback?
Web Design | | georgetsn1 -
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 -
Time On Site and SEO?
Does time on site impact rankings? If a person visits your site from the serps or directly visits it by typing in your name in the search field and then leaves within a minute, will that impact your serps? What is the best way to increase time on site?
Web Design | | bronxpad0 -
Best layout pages for SEO
Dear all, what would be the ideal layout of a webpage for SEO? How would a homepage and landingspage look like? Thanks in advance! Best regards, Ben
Web Design | | HMK-NL0 -
E Commerce Product URL SEO
Hi, first question here. In response to Paddy's wonderful article and Rand's related article from 09 I've found myself asking this question. "www.home.co.uk/product" or "www.home.co.uk/category/product" As I'm currently reviewing the structure for so many of our e com sites the article comes at a great time. I'm going for home/category/product so I can optimise for a category, as category based searches are quite high and competitive. Yes some products can appear in 2 categories but I'm combating it with 301's or image based links. What are your thoughts.
Web Design | | PASSLtd0 -
Live Text in Navigation Vs. Image - Does this affect SEO
I recently was asked the question if having live text in the navigation vs and image affect seo. For example, refer to this link http://markup.io/v/avsaenq856kw the navigation highlighted is seperate images. The html elements read : ![](</span><strong style=)/images/procedures.png"> Live text html reads like this: Breast » What is better for seo value, or does it now matter having live text or an image?
Web Design | | Red_Spot_Interactive0