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
-
Woocommerce SEO and Product attributes
Hi friends! I have a question that is advanced Woocommerce and seo-related.
Web Design | | JustinMurray
I'm seeing http://www.mywebsitex.com/pa_keyword/indexed in Google, but it cannot be properly optimized, and I would prefer to have a WordPress Page indexed for that keyword instead, which also lists those products and can be fully seo optimized. Woocommerce SEO plugin by Yoast lacks documentation and I have no clue if that would even fix this. I do have the Taxonomy (pa_keyword) set to not include these in the sitemap, but there doesn't seem to be a way to noindex/nofollow product attributes.
1. How can I best accomplish this?
2. Why are product attributes indexed by default?0 -
How we can check whether website design is good for SEO or not?
Is there any tool available to check website design whether it is good for SEO or not?
Web Design | | ross254sidney0 -
What would be the best way to translate my website for international seo?
I am planning on creating a multi language website that targets different countries and would like to know what would be the best way to translate my content from English to multiple different languages (French, Spanish, Swedish, Chinese, etc.). I would hire a translator but doing so for all these different languages would be too costly. Using Google translate will leave me with at best a rough translation. What are my other options? Is there a website that can provide me a better translation? Would Fiver be a better/cheaper alternative? Thoughts?
Web Design | | Shawn1240 -
Which Hat of SEO (Black/White) Goes with this Green Lace Dress?
Doing some research (honestly) I came across this page: http://www.modcloth.com/th/green-lace-dress That page ranks very well for the phrase "green lace dress" - #2 in Google for me. I'm sure there's a good amount of links coming into it, but on the surface there's only 1 mention of green on the page and 2 mentions of lace. Looking at the code, you can see ModCloth is using the Quick View links below the products to display a more detailed description of the product - wherein lies many more instances of green and lace. So I ask: Which color of SEO hat goes with this green lace dress - Black or White? Is it good SEO to only show the product descriptions when the user initiates the Quick View? Or is it shady SEO to hide so much text from the immediate view of the user? Please select one and explain why.
Web Design | | rball10 -
How important are tags on blogs?
Hi, I've always used tags on blogs, but I've noticed that some prominent and reputable blogs (e.g., SEOmoz blog, Problogger, Copyblogger) are no longer using tags at the end of each post. I'm curious about what is the reason for this - any ideas? Thanks in advance, Carolina
Web Design | | csmm0 -
What can this charity site do to improve SEO?
Hello wise ones, We have been working with the charity Volunteers of America to create a new site for their car donation program at carshelpingpeople.org They are a national charity with extensive local programs run by regional affiliates, so the site is divided into a small national section linked to Regional Affiliate sections. You get to the regional sections either by entering your zip code or clicking on your state in the bottom nav of the national pages. Right now we have developed regional sections for Michigan, Nevada, Maryland, Washington D.C., New Jersey, Delaware and the Philadelphia area. The site is about 2 1/2 months old, and while our conversion rate is pretty good (7%) our organic search ranking isn't improving as quickly as we'd like to see. Car donation is a very competitive space, and we would appreciate any advice on how to improve the SEO of the site. Thanks so much.
Web Design | | Phibnax0 -
The ideal SEO e-commerce site
Hi All, I am currently writing a spec for moving our current e-commerce website and it got me thinking from an SEO perspective. We are all usually restrained by the current website set-up / CMS and there are things it can never do despite how hard we push for the changes. If you had the chance to start from a blank canvas (like I do currently) what would be on your wishlist?
Web Design | | RikkiD220 -
How WP Themes work with Navigation Structure for SEO and JQuery Headers?
I am trying to find the best WP Theme for our company. I noticed most of them do not offer a left hand side navigation on the home pages, and usually are on the right side on the inside pages. I always thought that Home Page links were very important for SEO. Currenly we have a left drop down navigation with all of our product catagories, keyword optimized. The structure follows for all the pages. Is this not as important to Search Engines anymore? Is it better to have a products link, to all the products and then the inside pages, have just a navigation bar, for that particular catagory? This seems to be very common on all the templates i am seeing. I also noticed, and really like the JQueary Tabs. I would use this for displaying, PDFs and Specifications Charts. Also, some home page images are using a jquery slider with some text, linking to a page. Is Jquery the new javascript and do search engines see what is in the code? I also noticed they all have footers that have links and some other information. Is this a SEO must have?
Web Design | | hfranz0