Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

JohnRivs's avatar

SEO and Laravel

I asked this a few months ago to Jeff, and I wanna get some feedback from you guys.

I find clients who refuse to drop Wordpress just because they heard is too good when it comes to SEO, but it makes my work harder.

How do you approach the SEO aspect of a web app built with Laravel?

0 likes
8 replies
rovansteen's avatar

My opinion is that the most successful way to handle SEO is just good content. Google ignores most meta tags these days. So there is not much Wordpress could do better than a Laravel application with the same content. Things like unique titles, pretty url's and speed are important to Google, and those can easily be done with Laravel.

keevitaja's avatar
Level 13

First of all WP is a CMS while Laravel is a PHP framework. All that can be done with WP, can sure be done with Laravel.

I suggest you ask your clients to explain, what do they think SEO is. I'm pretty sure they have no clue. Next ask three more questions:

  • Can WP generate backlinks?
  • Can WP generate unique content?
  • Can WP generate anything?

Of course answer is NO. WP is as good as is the human behind it.

But if you really need a CMS, then Laravel should not be your tool of choice!

11 likes
unitedworx's avatar

How I handle this with new clients sites is basicly spotting a few things that are not done well in terms of on-site SEO and sell to them how well or easy my cms handles these things automatically. E.g. Proper use of h1 tags, automatic generation of slugs based on an article title, auto renaming images in a page following the content title, including of automated things that bring value to the visitor but also help of important seo wording to be there. Etc etc. Other than some basic technical stuff I relly show them examples of websites that we did without doing specifically seo but the websites coming up on searches coz our cms and overall websites was tuned with seo in mind.

Also if I get new clients that have sites based on Wordpress or Joomla I strongly advocate against them form not being so secure especially if there is nobody to update them regularly. Didn't find anyone with Wordpress site and not being hacked at least once! Also I advice that the systems are build for covering a zillion different use cases and this makes them complex and not easy to use in the admin area while I will produce something dead easy to use and exactly what they need as a business.

Also remember that you are selling something invisible so it's more about Builting trust with the client than trying to throw a lot of technical stuff on then that they won't understand!

2 likes
azimidev's avatar

I agree, good content is the key. Clients have no clue about what SEO is. All they wanna believe is their website suddenly goes on top of the search rankings. Have a look at this website: Laracasts, Jeffery added not many meta tags but he has the forum which I bet is now better than stackoverflow for Laravel, so now if you search anything related to Laravel you will see this forum pops up for sure. Good to mention these facts:

  • Dynamic title tag
  • Dynamic description meta tag
    • Dynamic facebook description tag
    • Dynamic twitter description tag
  • Not too long keyword tag (which mostly is ignored my Google these days)
  • Very high quality contents
  • Speed performance
    • by minimizing your css
    • by minimizing your javascript
  • robot.txt file
  • sitemap.xml file
  • Google webmaster tools
  • Using alt tags fro images
  • Using title tag for most HTML tags
  • Optimize images for better download
  • Avoid using flash
  • have a look at here

Something like this:

<title>@yield('title', config('app.name'))</title>
<meta name="description" content="@yield('description', config('app.description'))"/>
<meta name="keywords" content="@yield('keywords', config('app.keywords'))"/>
<meta name="copyright" content="{{ config('app.name') }}">
<meta name="author" content="{{ config('app.name') }}"/>
<meta name="application-name" content="@yield('title', config('app.name'))">
<!--GEO Tags-->
<meta name="DC.title" content="@yield('title', config('app.name'))"/>
<meta name="geo.region" content="GB-HMF"/>
<meta name="geo.placename" content="London"/>
<meta name="geo.position" content="51.493272;-0.239747"/>
<meta name="ICBM" content="51.493272, -0.239747"/>
<!--Facebook Tags-->
<meta property="og:site_name" content="{{ config('app.name') }}">
<meta property="og:type" content="article"/>
<meta property="og:url" content="{{ request()->fullUrl() }}"/>
<meta property="og:title" content="@yield('title', config('app.name'))"/>
<meta property="og:description" content="@yield('description', config('app.description'))"/>
<meta property="og:image" content="{{ request()->root() }}/images/TODO.png"/>
<meta property="article:author" content="https://www.facebook.com/TODO"/>
<meta property="og:locale" content="en_UK"/>
<!--Twitter Tags-->
<meta name="twitter:card" content="summary"/>
<meta name="twitter:site" content="{{ '@' . config('app.name') }}"/>
<meta name="twitter:title" content="@yield('title', config('app.name'))"/>
<meta name="twitter:description" content="@yield('description', config('app.description'))"/>
<meta name="twitter:image" content="{{ request()->root() }}/images/TODO.png"/>
7 likes
princeoo7's avatar

@AMIRHAZZ - I was looking for the solution. this is what i normally do but how to set it from the controller itself ? means do currently i am doing it from the blade file and this gets a lot of code into this. can i just define it in the controller and fetch it to the main code skipping the blade file in middle ?

Please or to participate in this conversation.