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
-
No cache meta tags - does it help Google get back and reindex faster?
I saw these meta tags on a site and am trying to figure out their benefit. These meta tags are on the home page, product pages, every page of the site. Will it cause search engine bots to come back and index pages faster? Will it cause slower page loading in browsers if nothing is cached? http-equiv="pragma" content="no-cache"/> http-equiv="cache-control" content="no-cache,no-store,must-revalidate"/> http-equiv="expires" content="0"/>
Web Design | | CFSSEO0 -
Responsive design to serve different page for IE8 - SEO Implications?
A client is planning on developing a responsive designed website which redirects visitors using IE8 to a static webpage that encourages users to visit in another browser. What are the SEO implications of a server redirect just for IE8 visitors? Possible solutions: would containing a link on the static page to "continue browsing" and give the visitor access to the entire site in IE8 work well? Or should a CSS overlay message appear to IE8 visitors, no redirect, that encourages them to visit in another browser? Or serving a separate stylesheet for IE8 visitors, and not giving a responsive experience be optimal? Any suggestions or thoughts are appreciated. Cheers, Alex
Web Design | | Alex.Weintraub0 -
Site structure and blog tags for local with five locations
I have a client who has five locations. Their current web site was structured very well for the pre-penguin and Panda world. However it does not seem to do as well after these changes. I believe it would serve them both with their customers as well as on Google if they localized the site for each location. Currently all the content on the site if focused on one location that is in the largest metro. On the content side we have a plan to produce local content and blogs for each location. My questions are how to go about structuring the site map and blogs to provide the most local juice. I was also wondering how to properly mark up a site with a main trunk and five local branches. I am also trying to figure out how to structure the tags on the blog. On the site map itself I was planning on maintaining all the content as well as the older blogs in the main trunk of the web site. Under this trunk there is a locations page that currently goes to five pages that simply have an address as well as a bulletin board of upcoming events. The blog is directly off the main page with no tie to any location. Here are my thoughts on what I think we should do: I believe we should create a mini web site starting at the location page that has specific content and navigation related to each location. That the content should focus on the specifics of that area and what would serve that clientele the best. We should add to each branch location based on the key words and competition in that area. The blog off the main web site should continue to house the general categories that are already there as well as any other general posts. I think we should add a link to each store page with a location specific blog in each mini location site. Each mini location site should have it's own blog with specific blogs targeted towards the local market. This local blog would also feed in the general blogs from the "trunk" as they are posted. Relating back to my original questions: is what I outlined the right approach or is there a more effective way to do this? Is there any special mark up I should do to tell the directories what to do? How do I structure the tags for the blog? I was thinking of a structure like this: General blog/category/subject under the main structure : local blog/category/subject Any ideas of input on this? Ron
Web Design | | Ron_McCabe1 -
How do I gain full SEO value from individual property pages?
A client of ours has a vacation rental business with rental locations all over the country. Their old sites were a messy assembly of black hat, broken links and htaccess files that were used over and over on each site. We are redoing everything for them, in one site, with multiple subdirectories for individual locations, like Aspen, Fort Meyers, etc. Anyhow, I'm putting together the SEO plan for the site and I have a problem. The individual rental properties have great SEO value (lots of text, indexable pictures, can create google/bing location pages), and are great for linking in social media (Look at this wonderful property, rental price just reduced!). However, I don't want individual properties, which will have very similar keywords, links, descriptions, etc, competing with each other when indexed. Truth be told, I don't really want search engines linking directly to the individual property pages at all. The intended browsing experience should allow a user to "narrow down" exactly what they're seeking using the site until the perfect rental appears. What I want is for searchers to be directed to the property listing index that most closely matches what they're seeking (Ft. Meyers Rental Condos or Breckenridge Rental Homes), and then allow them to narrow it down from there. This is ideal for the users, because it allows them to see all available properties that match what they want, and ideal for the customer, because it applies dozens of pages of SEO mojo to a single index, rather than dozens of pages. So I can't "noindex" or "nofollow", because I want all that good SEO mojo. I can't REL=CANONICAL, because the property pages aren't similar enough to the index. I can't 301 Redirect because I want the users to be able to see the property pages at some point. I'm stymied.
Web Design | | SpokeHQ0 -
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 -
Site Activity, SEO, and behind login
I have a site that provides online education and as such, most of the user activity happens behind a login. This has me thinking about potential SEO impacts with a few questions that maybe someone could lend some light on: How important is activity (above just search activity) to the search engines Would it help to enter these pages, even though they're behind a login, into GA as we have with the front-end of the site Does a subdomain make a difference (right now we implement the course as a subdomain of the main site Lastly, as I was looking at compete.com, I am wondering how they get these use statistics?
Web Design | | uwaim20120 -
Drop Down Menus & SEO?
Do these typically have a negative impact on SEO? I know this is kind of a vague question, does it make it harder to spider? Are there SEO friendly ways of coding these? There are so many sites out there that have these, so I've got to assume it's different on a case by case basis.
Web Design | | MichaelWeisbaum0 -
What's the best SEO option for jQuery image carousels?
My client wants a fancy jquery carousel at the top of their home page, as is all the rage these days. I would like to add some nice SEO friendly text to that carousel, but I'm not sure how best to do that..I assume that by keeping the text which will appear in the carousel in divs on the page, which will be swapped out as the images cycle, it should still be easily picked up by search engines?
Web Design | | TroyCarlson1