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?
-
Alan's answer is spot on.
Avoid javaScript or carefully follow best-practices so Google can crawl all content without reading javaScript. Alan is exactly right when he said: never count on Google crawling through your JavaScript to find content, but also never count on being able to hide anything from Google via JavaScript.
Whether you use PHP or not is not directly relevant. PHP is executed server-side, so Google never sees your PHP code and doesn't care. What matters is whether your programmer writes PHP code that will generate search friendly HTML code, url structure, etc.
-
JavaScript is one of several technologies that offers severe limitations in search engines and their ability to properly see content, then just as important but often overlooked, properly and cleanly evaluate that content from an SEO perspective.
Specific considerations:
- Google does a "fair" job at discovering content passed through JavaScript (either on-page or at the code level)
- A "fair" job means it's hit and miss as to whether their system can actually find that content
- Whatever content the Google system CAN find via JavaScript is NOT necessarily able to be used to properly evaluate content intent, focus or relationship to other content
So - the best practices recommendation is if you want/need content to be found and properly evaluated by Google (or Bing) do NOT pass it through JavaScript.
And also, if you want to HIDE content from Google, don't assume you can successfully do so via JavaScript either.
As for PHP, its the most widely adopted and utilized web programming language out there. The language by itself is essentially SEO neutral. It's all in how a programmer utilized PHP that matters. In the hands of a programmer that either truly understands SEO or collaborates closely with an SEO expert (who also understands the limitations/pitfalls that can arise with "bad" (SEO-unfriendly) PHP coding, it's a great language.
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
-
Homepage Gateway for Website Divisions (Residential / Commercial) Bad for SEO?
When a website offers multiple divisions for products and services would it be a good SEO practice to implement something as Culligan does by having their homepage be a sort of gateway to the different divisions of site (home, office, commercial, industrial)? 2DaYz
Web Design | | m-johnson0 -
Have an eBook. What is best practice for SEO?
Hello We have a free eBook - its a great resource and great piece of content. It is available to download on our website here - http://re-timer.com/the-product/how-to-sleep-better/ The book is available as a whole or as individual chapters (i.e. http://re-timer.com/app/uploads/2015/07/Chapter8.pdf?b0df38). The PDF chapters appear to be doing well in Google search for certain keywords. I can't measure this in GA though. I would like the eBook to assist the SEO of my website overall. If I create a web page and 'embedded' the PDF into it will Google still crawl this page? At the moment we are also using this to collect email addresses, this is a nice to have and it is OK if people get the eBook without doing this (if they find a chapter in Google they currently don't have to enter their email address). I'm sure lots of people have eBooks now. What is best practice and the best way to use this as a tool to maximise SEO for the whole website (http://re-timer.com)? Thank you! Laura
Web Design | | LauraFalls1 -
Any body can help me to make my web site seo freindly?
any body can help me to make my web site seo freindly? i have not big budget please email me fabric35@hotmail.com
Web Design | | fabric-fabric0 -
SEO Tips for Affiliate Website
Hi all , I would just like to have an expert Opinion on SEO for Affiliate Website . Basically if I list all Third party products (Amazon/Affilate Window etc ) on my website and then the customer will be redirected to the Affiliates website to make a Purchase will there be an issue with SEO (Lots of Outgoing Url's) and Will the website not rank for Important keywords or will it be hit by any penalty ? I heard it's not good for SEO , any work around this ? If this is case How come cashback Sites rank well with no issues , although the concept is basically the same ? Any Tips or Advice appreciated as how to get this done safe . My Preferred Option would be with Magento Shopping Cart or second option would be with Wordpress Cart only in case this provides some SEO benefits over Magento by some plugins .
Web Design | | Aus0070 -
Will SASS ruin my SEO?
Hello, I am thinking about using SASS for my website, striping the current CSS style sheets and translating it all to SASS.. will this hurt my SEO?
Web Design | | DanielBernhardt0 -
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 -
SEO For Lead Generation
From an SEO point of view, is it okay to have a sites focus to be Lead Generation? We will do a small amount of blogging and we'll also have longer form sales pages on the site... but the main focus would be lead generation pages that we'd target for the SERPs. TO ME... this seems fairly spammy. If we had 50-60 landing pages with only 100-300 words of copy on them. If this is "okay" then how much should we altar up these landing pages in terms of content? None of them will be direct copies... but I just want to make sure that we stay above a ratio that would be good for SEO. Then lastly... How many main terms can we expect to target with a landing page? Should we focus each landing page to a keyword, or can we target a few and still rank effectively?
Web Design | | lifeseo0 -
Should I Remove URL extentions for SEO?
We are having a developer design our website with Magento. I noticed the main pages such as About Us have no file extention in the URL. But the product pages have a .html file extention. I was once told to remove the file extentions. Are there benefits to removing the .html file extension and if so, is there a way we can do this using Magento?
Web Design | | hfranz0