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
-
Booking Engine SEO Question
Hello, I am working on a travel site-mostly content based, but for the deals section of the site, we were thinking of being powered by expedia...if we go with a booking engine (Expedia) will that hurt us with regards to SEO? If Google is looking for content and not another booking engine how can we overcome this? Do you think this approach is positive? any thoughts or advice on this, thanks so much.
Web Design | | lanigreg0 -
On Page Local SEO
What do you believe is the best approach when it comes to Local SEO for businesses in 2013?
Web Design | | BlueRockDigital0 -
Wordpress Frameworks for SEO - Genesis - Does it Get Any Better?
I'm sure there's a ton of people in this community running Wordpress, any Genesis developers/users out there? For anybody who doesn't know, Genesis is a parent framework for building wordpress child themes. It saves a ton of time for people that aren't too handy w/ php (like me). I'm working on a few sites locally with it right now, and it's really impressive. I'm seriously never planning on using another WP framework. It also integrates perfectly with Yoast SEO, which is something not all frameworks do. So I thought I'd try to get some input from the community here, anybody have another framework they like? Or have an opinion on the SEO benefit of genesis? Would love to hear...
Web Design | | SVmedia0 -
Home page redirect - will this cause an SEO problem
Hello, We are using Wordpress to build a wiki site. The wiki plugin we're using (Wordpress Wiki lite) can only be set up on an internal page like nlpwiki(dot)org/wiki Can we redirect the home page to the /wiki subdirectory and use nlpwiki(dot)org/wiki as our home page? I've never done that, just wondering if it will be indexed as the home page or if there are any connonical issues. Thanks!
Web Design | | BobGW0 -
So apparently SEO moz will get us de-indexed according to a SEO company!
Each and every day i get called up from an SEO company who promises to get me top spots in Google rankings if i quickly get on their special offer they have today normally i would say "no thanks and put the phone down" but i had a bit of spare time so i indulged the guy and we got talking. After the introductions and speal about his company he was showing me what his company does and how they go about it to get me top ranks (they don't get me ranks but create a website they own which then passes leads to me- kinda clever since they could then start charging me per lead or my competitors) We continued to talk and i mentioned i used SEOmoz to check my rankings and back links etc and he told me that Google are cracking down and anyone using these types of software/websites will get their websites de indexed. This struck me as BS but i wanted to get your thoughts on the matter, i personally don't believe Google would ever do such a thing as this since it would be so easy to get your competitors websites taken down (i.e. negative seo) but its certainly a talking point.
Web Design | | GarethEJones0 -
SEO and Server Connectivity....
Good Morning/Evening Mozzers, I arrive at work this morning with 5 emails from GWT for my separate domains reading, **"Googlebot can't access your site - **Over the last 24 hours, Googlebot encountered 39 errors while attempting to connect to your site. Your site's overall connection failure rate is 15.1%." I have passed this on to the Web Dev team to resolve ASAP. My Question, will server connectivity issues harm my rankings? Is there a danger if this continues that URL's could be de-indexed? Input would be greatly appreciated.
Web Design | | RobertChapman0 -
To many scripts in my homepage. This is a problem in SEO?
I adding a lot of new features to my website: JS animated, menus, google translate, alexa counter, google analytics, salesforce, and so on. My website is full of scripts and im worry about the SEO. Is that an issue?
Web Design | | Naghirniac0 -
How to Add canonical tags on .ASPX pages?
What is the proper way (or is it possible) to add canonical tags on website pages that end in .aspx? If you add a canonical tag to the Master Page it will put that exact canonical tag on every page, which is bad. Is there a different version of the tag to put on individual pages? And one to put on the home page without the Master Page error?
Web Design | | Ryan-Bradley0