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 SEOs really need to care about trend in increase of voice search?
Hi all, Just browsing through the articles like "SEO trends in 2108"....I can see everyone mention about increase in voice search and attributing same to the SEO at top. But there is very less information on how to optimise for voice search....May be, they don't know what SEOs have to do exactly with voice search. Basically the input method is going to change on search and else remains same. This must be leading to increase of long tail searches and more search snippets to give an instant voice answer. What else has to be optimised to favoured in voice search? Thanks
Web Design | | vtmoz2 -
How to optimize SEO value of links in a calendar
Hi All- I am building a website about outdoor activities (cycling, kayaking, hiking, etc.). The site will most likely be built with either Joomla or Wordpress. A key piece of the site will be a calendar of upcoming events. The calendar will list the basic attributes of each event like date, time and location. However if an event has a webpage of it's own I will also include a link to that page in the details of the event. My question is: How can I create a calendar that will capitalize on the SEO value of the links included in the event descriptions? I've noticed many similar sites put events into a Google calendar and then embed the Google calendar into their webpage. In that situation would Google even see any external links included in the descriptions of the events? Thanks in advance for any input. -Chris
Web Design | | 1968Rouleur0 -
Just How Bad is Adobe MUSE for SEO?
Adobe's new website builder "Adobe Muse" has a reputation for creating terrible code. I want to know if anyone has experience with the software and what your opinion is on just how bad the code really is for SEO. I'm currently using "Weebly", which is a similar, but more basic website building software. My results for SEO have been going well using that software, however it's limited in terms of building an aesthetically pleasing website design. On the other hand, you can build gorgeous websites with Adobe Muse, but I don't want to use it if it's going to prevent me from ranking. What are your thoughts?
Web Design | | Alchemist230 -
Seo for design webinar ?
I've got no problem using google webfonts on their own, but what about using them over an image; specifically a clickable image? Its easiest to place text over an image if the image is a background image, but then the image isn't easy to make clickable. Am I missing something - this shouldn't be hard, right. Thanks!
Web Design | | saultie0 -
Best Wordpress Themes or Theme Creators for Best SEO Results
Hi, I just recently joined SEOMOZ and am excited to be apart of the community. I am launching a blog to educate mu readers on a variety of topics. Is there any specific themes or theme creators that do a great job at structuring their themes from a technical perspective for the best SEO results? Thanks!
Web Design | | ROYINOW0 -
Javascript, PhP and SEO Impact?
What are the Pro's and Con's of using Java Script and PHP in a site when factoring in SEO?
Web Design | | bronxpad0 -
Implementing a new Nav Bar: Best practice, SEO benefit, your suggestions?
Hi Mozland, We are going to have a new Nav Bar for our site built from the horror that we currently have to up with. We want to make it a simple affair, similar to The Guardian two-tier Nav Bar - main menu which will drop down to the 2nd tier according to what you clicked on in tier one. Regular stuff, I think. Any suggestions, from your experience, about how best to implement this, what to include, what not to do, what can be included and done to make it as best it can be to get people to peruse our site as easily as possible? Thanks
Web Design | | Martin_S0 -
What do web designers consider to be SEO
I'm putting together an article about Web Designers and SEO. The basic crux is that most designers will at most (if you are lucky) add in title tags, maybe pretty URL's and HTML links and call it SEO friendly. (lot's who don't probably but also lot's who are even worse) Of course I want it to be a bit controversial so please feel free to let rip. My argument is clients who have previously had site's that have had "SEO on them", know think that all SEO is a waste of time as their previous experience didn't produce the traffic and sales they were expecting. I don't know many designers who independently consider a site marketing strategy and how a site is going to generate links in the long term. I'm sure most of us have read this post on SEO responsiblities but becasue the first port of call for most business owners are the web designers, our offering is undermined by their misunderstandings and in some cases mis-sellings. So under the working title, "Why Web Designers Are Bad For SEO", any care to share some imput.
Web Design | | FDC1