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
-
Web Developments and Breakpoints for SEO
Google likes fast and clean pages. Pages load better when they are optimized for each platform. With the new Ultra HD resolutions and ultra phones, what is the optimal number of breakpoints for web page with images on them?
Web Design | | Atlanta-SMO0 -
Adding Nofollow tag
To stop getting our sites particular page in search engine we use "nofollow" tag. But the code is inside <a>tag and i didn't have that tag in my page. What would i do? how do i insert it in my page and where?</a>
Web Design | | FhyzicsBCPL0 -
How import are breadcrumbs SEO wise on a wordpress blog?
I was recently told I should take the breadcrumbs off of our site, for if no other reason than that it would look much nicer, and I tend to agree. I was curious how much seo weight breadcrumbs add to a site, and if I would take a big hit if I removed them... Thanks!
Web Design | | NoahsDad0 -
Image Replacement Using Cufon (Javascript), SEO effects
Hello Friends, I am using Cufon for image replacement in my website. May I know, does Cufon have any negative seo effects? Will this affect the search engine ranking or loading time of my website? What are the advantages and disadvantages of using cufon in a website in seo perspective?
Web Design | | zco_seo0 -
Google Tag Manager
I recently discovered the Google Tag Manager and I am in the process of updating many of my websites with this feature. I am using Tag Manager to mange Google Analytics, Google Remarketing, Alive Chat, Woopra, etc. I have one question about how Tag Manager actually works. As best I can tell, the Tag Manager code snippet that I insert into my web pages is the same for all my websites and does not include a unique ID. If that is the case, then Tag Manager must search all the URLs in the TM database to find a match. What is to stop someone else from adding some rules for my URLs to their containers? I expect Google has a method to ensure proper matching, but I'm not clear on how that is enforced. Best,
Web Design | | ChristopherGlaeser
Christopher0 -
Html 5 main and secondary navigation for SEO best performances
I am building a website which will have a main navigation related to the site and each link of the main navigation will have a secondary navigation. We do not want to use a megamenu style navigation. I will try to explain it with a example: Let's start with an example for a computer store "My PC Store", the Main Navigation would be: Desktop PC's Notebook & Tablets
Web Design | | netbuilder
Multimedia When clicking on the "Notebook & Tablets" the user is directed to the page domain.com/notebook-tablet.html and on this page the secondary navigation appears: Laptop Netbook Tablets / iPad I am confused on how I should organize the semantic navigation for best SEO performances and I need advice / suggestions. I thought about 2 different ways to do it but which one is more appropriate in terms of SEO? PROPOSITION A Home Page: <header> My PC Store <nav> Desktop PC's Notebook & Tablets Multimedia </nav> </header> Sub-Page (Notebook & Tablets): <nav>(or <aside>?) Desktop PC's Notebook & Tablets Multimedia </aside> </nav> <header> Notebook & Tablets <nav> Laptop Netbook Tablets / iPad </nav> </header> As you notice on the home page the Main Site Navigation is included in the <header>while it is not in the sub-pages. PROPOSITION B Home Page: <header> My PC Store <nav> Desktop PC's Notebook & Tablets Multimedia </nav> </header> Sub-Page (Notebook & Tablets): <header> Notebook & Tablets <nav> Desktop PC's Notebook & Tablets Multimedia </nav> # Notebook & Tablets * Laptop Netbook Tablets / iPad </header> The main navgation remains always in the <header>(home page / sub-pages) of all page. I need suggestions... How would you guys organize the nav ? </header> </header>0 -
Geo targetting and SEO
Hi all!
Web Design | | lhernandezBum
We are about to launch a new geotargetting feature on our site. Basically, nowadays we have a normal Homepage (example: myHomepage.com). Next week, the homepage will depend on your localization (checked through IP): For example, for Texans there will be a myHomepage.com/Texas (automatically redirected), for New Yorkers a myHomepage.com/Newyork. My question is, how can this affect SEO? Where will the bot go? Hopefully the answer is not "depending on where the bot is hosted"... because this can be dangerous. Also, I don't think that "telling the bot to go to a generic Homepage" is a good idea, as Google dislikes when you show them something different from the human users. Thanks0 -
Infinite scrolling - is it SEO friendly ?
If i am trying to implement infinite scrolling and remove pagination completely, will it effect my SEO ? Why or why should not infinite scrolling be implemented ?
Web Design | | Myntra0