PHP

SEO and GEO for PHP, Laravel, static HTML and React or Vue websites

5 min read By Cloud Ninza

You do not need WordPress to rank. Hand-built PHP and static sites can be the fastest and cleanest on the web — if every page carries its own metadata and the content is in the HTML.

In short PHP, Laravel and static HTML websites rank well when each page has its own title, description and canonical, the content is in the HTML (pre-render React, Vue or Angular apps), sitemap.xml, robots.txt and llms.txt are served at the root, Organization and FAQ schema are present, URLs are clean and missing pages return 404. On Cloud Ninza, Search Master checks the live site, scores each page and can serve the three files for you, and static sites are served directly by the web server for top speed.

1. Static HTML sites

Static sites are the fastest kind there is — the web server sends files directly — so they start with excellent Core Web Vitals.

  • One HTML file per page, each with its own <title>, <meta name="description"> and <link rel="canonical">.
  • One <h1> per page that says what the page is about.
  • Clean addresses: on Cloud Ninza static hosting /about serves about.html automatically.
  • A real 404.html; the server returns status 404 with it.
  • Images compressed (WebP) with width, height and alt text.

2. React, Vue and Angular single-page apps

A single-page app sends an almost empty HTML file and builds the page in the browser. Google can usually render it eventually; most AI fetchers cannot. Pre-render instead:

  • Vite + React: a static-site generation plugin, or move to Astro or Next.js for content pages.
  • Vue: Nuxt (SSG or SSR) or a pre-render plugin.
  • Angular: Angular SSR / prerendering.
  • Set each route’s title and description at build time, not only in the browser.
  • Deploy the built dist folder to Cloud Ninza static hosting with Deploy a zip or Git.

3. PHP and Laravel

  • Pass title, description and canonical to the layout from every controller (Laravel: a @section('title') / @yield or a view composer).
  • Generate sitemap.xml from routes and the database (a route or a scheduled command).
  • Return abort(404) for missing records and Redirect::to(…, 301) for moved pages.
  • Use route caching, config caching and OPcache for speed; keep APP_DEBUG off in production.
  • Never expose .env, logs or backups — Cloud Ninza blocks these addresses on every site.

4. robots.txt, sitemap.xml and llms.txt for every type

Every public website needs a robots.txt that allows search engines and AI crawlers and names the sitemap, a sitemap.xml with every public page, and — for AI search — llms.txt and llms-full.txt. Search Master generates them from your live pages and business details and the web server answers those addresses in front of your site; if you already have good files, Keep mine leaves them alone, and Keep mine and add what is missing completes your robots.txt.

5. Schema without a CMS

Paste one Organization or LocalBusiness JSON-LD block into your layout or every static page’s head, and FAQPage JSON-LD on pages with FAQs. Search Master’s Business & schema tab writes the Organization block from your details (up to 25 social profiles, several offices and phones) and its FAQ schema maker turns your questions and answers into JSON-LD.

6. The best SEO tool for sites without WordPress

On Cloud Ninza, Search Master works for this kind of website from the dashboard (Marketing → Marketplace) on Growth, Business and Pro plans: a live health check, a score for every page, robots.txt, llms.txt and sitemap.xml served in front of your app without touching your code, IndexNow, and ready Organization and FAQ schema to paste.

Because it reads the public site, it works the same for a single HTML page, a Laravel app or a pre-rendered React site.

Writing pages that rank, whatever the technology

The framework only delivers the page; the words decide whether it ranks. Give each page one purpose and one main phrase. Open with a direct answer in two or three sentences, then the details a buyer needs: prices or ranges, what is included, how it works, how long it takes, who it is for. Add photos of your own work, a few customer quotes, the business’s real address and phone, and 4–8 FAQs. End with one clear next step.

For a static site, that often means turning a single long home page into separate pages for each service — one page cannot rank for ten different services.

A static site deploy checklist

  • Every HTML file has a unique title, description and canonical.
  • sitemap.xml lists every page with its clean address; robots.txt names it.
  • 404.html exists; links between pages are relative or https.
  • Images are WebP with width, height and alt text.
  • Organization JSON-LD in every head; FAQPage on pages with FAQs.
  • After upload: run the health check and send all pages to IndexNow.

Laravel specifics

Use a view composer or a small SEO service to set defaults and let each controller override title, description, canonical and Open Graph image. Generate the sitemap with a scheduled Artisan command that writes public/sitemap.xml, or let Search Master serve one. Run php artisan route:cache, config:cache and view:cache on deploy; Cloud Ninza Git deploys can run them as the build step. Keep storage, .env and vendor out of the web root — Laravel’s public folder is the only one the web should see.

Monitoring after launch

Connect Google Search Console and Bing Webmaster Tools, submit the sitemap, and check the indexing report weekly. Search Master’s Pages tab shows each page’s score so you can improve the weakest first; IndexNow sends updated pages straight to Bing.

Local businesses with a simple website

Most static and PHP sites belong to local businesses, where local signals matter as much as the pages. Put the full address, phone and opening hours in text on every page (footer), embed a map on the contact page, add LocalBusiness schema with the same details, and link to your Google Business Profile. Create one page per service and, if you serve several towns, a page for each town only when you have something specific to say about it — real projects, local prices, staff based there. Thin pages that only swap the town name are treated as spam.

Ask customers for Google reviews and mention the service and area naturally in your replies. These signals decide who appears in the map results and who assistants recommend for “near me” questions.

Key takeaways

The short version, for anyone skimming:

  • Every page needs its own title, description, canonical and one H1.
  • Pre-render React, Vue and Angular so the HTML holds the content.
  • Serve sitemap.xml, robots.txt and llms.txt — or let Search Master serve them.
  • Add Organization and FAQ JSON-LD by hand once; Search Master writes it for you.
  • Static sites are already fastest; PHP needs caching in code and OPcache.
Host it with us

Static Website Hosting

Host an HTML, CSS and JavaScript website, or a React, Vue, Astro or Hugo build, on servers in India from ₹149 a month billed yearly. Backups twice a day (12 AM and 12 PM), last 30 days kept, restore any date yourself from your dashboard · Deploy a zip: upload a .zip, .tar.gz or a WAR of plain files and it goes live · Your last 3 versions kept, Make live to undo.

Ready when you are

Hosting from ₹149 a month on servers in India

WordPress, static HTML, PHP, Node.js, Python and Java plans with free SSL and your choice of version. Create your account, pick a plan and pay by UPI, card or netbanking; your hosting is created automatically and you get your login by email, usually within minutes.

Questions

Questions on this topic

Can a static HTML website rank on Google?

Yes. Static pages are fast and fully crawlable; give each page its own title, description and content, add a sitemap and schema, and they rank like any other site.

What is the best SEO tool for a static website?

On Cloud Ninza Growth, Business and Pro plans, Search Master checks the live site, scores pages, serves robots.txt, sitemap.xml and llms.txt and writes schema for you to paste.

Is React bad for SEO?

Client-only React is weak for search and AI fetchers. Pre-rendered or server-rendered React (Next.js, Astro, SSG) is excellent.

How do I add a sitemap to a Laravel site?

Create a route or scheduled command that writes sitemap.xml from your routes and models, or let Search Master generate and serve one.

Do I need WordPress to rank?

No. Search engines and AI assistants care about content, structure, speed and trust, not the CMS.

Where do I put JSON-LD on a static site?

In a script tag of type application/ld+json inside each page’s head (the Organization block can be identical on every page).

Does Cloud Ninza add a page cache to PHP sites?

Not a shared one — PHP code may personalise pages. Static sites need none. Cache in your code and keep pages light.

How do I tell search engines about new pages?

Search Master’s IndexNow tab sends all pages to Bing and other engines; also submit your sitemap in Google Search Console and Bing Webmaster Tools.