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 -
Need suggestion: What is the best internal linking structure for our website to gain in SEO & UX too?
Hi all, We have 3 different editions of our product we are selling with 20 features. 1st edition & 2nd edition comes with 15 features in which 10 are common in each edition. 3rd edition comes with all 20 features. Now what's the best way to interlink and show the navigational menu to highlight 3 editions and features as well? Much appreciated if some one refer me a website with such structure. Thanks
Web Design | | vtmoz0 -
H Tags for an Events Page
I wanted to get the thoughts of people here about how to best structure an events listing page for SEO. I have a list of events, all with dates, event titles, location name, city and zip. What I do currently is listed below. I also show a version for how I could revise it, but it would require me to duplicate the event date on the page. Any ideas, suggestions or best practice examples you can point me to would be greatly appreciated. Current Structure <state>Events - H1 Tag
Web Design | | abiondo
Friday, December 5, 2014 - H2 Tag
Event Title 1 - H3
Location Name, City, State - P Tags Event Title 2 - H3
Location Name, City, State - P Tags</state> I was wondering if I would see better results by doing the following instead. The benefits I see of this approach are the event titles are h2 instead of h3 tags and the con I see is duplicating the event dates <state>Events - H1 Tag</state>
Event Title 1 - H2
Friday, December 5, 2014
Location Name, City, State - P Tags
Event Title 2 - H2
Friday, December 5, 2014
Location Name, City, State - P Tags thanks, Anthony0 -
How can a Pincode finder website be SEO optimised?
Guys, I wanted to build a simple Pincode finder website for India. The targeted visitors as is obvious will be from India. Alike other Pincode finder websites, the users in this case too will have to key in the location / area of whose pincode he is looking for and they will get Pincode from that very location / area. Other than this, users will also come to this website when they search for something like " <location name="">pincode</location>" on Google (for instance, users will search for something like "Hiranandani Gardens Powai Pincode") Along with data fethced from our sources via Indian postal departments and other data available in public domain, we shall be using data from Google Maps API too. My question in regards to the same is as follows: What should the page-structure / structure of the website be for ranking well on Google? What should be the URL structure? Other suggestions to rank well on Google in this regards? Competition: (You can search for the term "Hiranandani Gardens Powai Pincode" to know how these sites show data) http://www.getpincode.info http://www.pincode.net.in Pls. help...
Web Design | | ShalinTJ0 -
Responsive design or mobile website for SEO
Because domains with a mobile version have better rankings in Google then domains with only a deskop version we're considering a mobile website. My web developer says that a m.domain.com is duplicated with the domain.com, and he recommends a responsive design. What is better for SEO positions in mobiles devices. A m.domain mobile website or a responsive design. What are influential factors?
Web Design | | remkoallertz0 -
Confluence and SEO
I think this is a difficult question so apologies in advance and any help would be appreciated! We currently have a large amount of support center content sitting on our main pages which we don’t think is very effective (mainly basic how to guides). We think it is difficult for visitors to understand and the UI is very poor. In order to solve this we’re currently moving this content onto a subdomain using Confluence, a wiki based team collaboration tool (from a company called Atlassian). What we’re planning on doing is very much like what Atlassian themselves have done on this page: https://confluence.atlassian.com/display/ALLDOC/Atlassian+Documentation What are the SEO issues / dangers that I need to consider before moving this content? I’m assuming that as this content will still be on the same domain then we can minimise link equity / authority loss by setting up re-directs to the new content. Also, has anyone had any experience of using Confluence and whether individual pages can be optimised for SEO? I notice that there are lots of add-ins that can be used, one of which is an SEO add-on which allows you to customise things like meta description tags.
Web Design | | RG_SEO0 -
Anyone used bugherd.com for onsite seo purposes?
Just as the title says, has anyone used bugherd.com for SEO purposes? I was thinking it could be used to show client changes that need to be made regarding the website. Example could be if you are looking at a CRO prospective, you may want to change/add some graphics or text to improve conversions. It seems like a nifty tool to show the changes you want made and to keep track of them. It integrates with basecamp also 🙂
Web Design | | KyleChamp0 -
SEO while designing the website and continuous SEO
What's the difference between SEO while designing/developing a website (ie, setting up a website so it is crawled by search engines) and the SEO that people talk about that needs to be viewed analyzed and changed all the time? I don't have a ton of money to spend on SEO right now but I do want to make sure my website is set up by an SEO expert (if possible) so when I do have money to spend on SEOthe website is set up properly to work with more advanced forms of SEO. I guess I don't understand where you can draw the line (if forced due to money constraints) between SEO in the beginning and continued SEO. What do I need to look for with SEO and the design of my website. How do I get some type of SEO without breaking the bank??
Web Design | | CapitolShine0