Hotel Azur Casablanca
A sea-view Casablanca hotel site, rebuilt for direct bookings and search: a licensed luxury-hotel theme that RAIN customised and extended with hotel JSON-LD, a PWA, a dark mode and a WhatsApp booking flow.


A seafront hotel site, rebuilt for direct bookings and search.
Hotel Azur Casablanca sits on the Ain Diab corniche, at the western edge of Casablanca, with a restaurant, a pool and its own spa, Azur Art & Spa. Like most independent hotels, it competes for the same guests twice: once against the other hotels along the corniche, and once against the online travel agencies that list its own rooms and take a commission on every booking. The brief was a credible English-language site that ranks for the searches travellers actually type (sea view hotel Casablanca, hotel Ain Diab, beachfront hotel on the Corniche) and nudges them to contact the hotel directly instead of booking through a third party, on a budget that ruled out a bespoke design.
We were open about the starting point, and we are open about it here. The site is built on a licensed luxury-hotel HTML theme: its layout, components, gold accent, Gilda Display and Barlow typography, Ken Burns hero slider and page structure come from the theme, not from RAIN. What RAIN did was turn that theme into the hotel's own production site and then extend it well past what the theme ships with. We rewrote titles, copy and room pages around the hotel's real room types; added hotel-grade structured data to 18 of the 23 English pages; hardened the Apache configuration with HTTPS, HSTS, a Content Security Policy and clean URLs; turned the site into an installable PWA with an offline page; built a full dark theme the template never had; and wrote a hardened PHP endpoint for the contact form.
On top of all that sits a small, consent-aware conversion suite that RAIN wrote from scratch and injected on 22 pages. A GDPR cookie banner is wired to Google Consent Mode v2, so analytics stay off until the visitor agrees. A floating WhatsApp button keeps the hotel one tap away. And a "Check Availability" card placed directly under the hero takes a guest's dates and party size, works out the number of nights, remembers the choice for the next visit and opens WhatsApp with a ready-to-send booking request. There is no booking engine and no OTA in between: the enquiry goes straight to the hotel's reception, in the app the guest already uses every day.
English pages, four of them room-type pages
Pages carrying hotel-specific JSON-LD
FAQ answers marked up as FAQPage schema
Pages running the RAIN conversion suite
Ten decisions that turned a licensed theme into a hotel's own site.
A purchased theme gives a hotel a polished look on day one, and very little else. It has no idea what the hotel is called, what its rooms cost, which searches matter or how guests prefer to get in touch. Everything below is the layer RAIN added on top of the theme so that it behaves like a production site for one specific hotel.
Start from a proven theme, then make it the hotel's own
The design comes from a licensed luxury-hotel HTML theme, chosen because it already handled galleries, room listings and restaurant menus well. RAIN kept its visual language and rewrote everything a guest or a search engine reads: page titles, descriptions, headings, room copy and navigation, organised around the hotel's single, double, triple and suite rooms, its restaurant, its pool and its spa.
Hotel-grade structured data on 18 pages
Every key page carries JSON-LD written for a hotel, not a generic business: a Hotel node with star rating, room count, price range, geo-coordinates, opening hours and 33 amenity features; the restaurant as a Restaurant; the spa as a HealthAndBeautyBusiness; 13 room Offers with BedDetails; 17 breadcrumb trails; 4 nearby tourist attractions; and a WebSite node with a SearchAction.
A conversion layer the theme never had
The conversion suite is RAIN's own code: about 290 lines of JavaScript and 340 lines of CSS, loaded on 22 pages. It injects a "Check Availability" card right after the hero, computes the number of nights from the chosen dates, remembers the chosen dates in the browser and hands the guest to WhatsApp with a prefilled, structured booking request the reception can answer at once.
Consent first, analytics second
Google Analytics 4 starts in a denied state through Consent Mode v2 defaults. A cookie banner lets the visitor accept everything or keep essential cookies only, stores the choice and its date in the browser, and only then updates the consent state. Nothing is measured before the guest has said yes.
A full dark theme, built by RAIN
The theme ships light only. RAIN wrote a theme manager (about 120 lines) and a 526-line stylesheet with 88 dark-mode rule blocks that override every surface, border and text colour. By default the site follows the visitor's system setting; a self-injected toggle stores an explicit choice and keeps the browser's theme-color in sync with the active mode.
An installable PWA with an offline page
A web app manifest in the hotel's gold, a 232-line service worker with a versioned cache and a dedicated offline page mean the site can be added to a phone's home screen and still answers with something useful when a guest loses signal on the way from the airport.
Apache, hardened line by line
A 234-line .htaccess forces HTTPS and the bare domain with 301 redirects, normalises trailing slashes, serves clean extensionless URLs, blocks dotfiles, and sends HSTS with preload, a Content Security Policy, Permissions-Policy, cross-origin isolation headers and X-Frame-Options. Server banners are removed, static assets are cached for a year as immutable, and HTML for one hour.
A contact endpoint that defends itself
The only server-side code is a 140-line PHP mail handler. It answers in JSON, traps bots with a honeypot field, rate-limits each IP address, sends its own security headers and is excluded from crawling in robots.txt. There is no database to patch and no admin panel to attack.
Open to search engines and AI answer engines
Canonical URLs, hreflang for English and x-default on 18 pages, Open Graph cards and a 17-URL sitemap cover classic search. The robots.txt explicitly welcomes GPTBot, Google-Extended, PerplexityBot, ClaudeBot and CCBot, while keeping tracking parameters and click IDs out of the index.
An image pipeline, ready to switch on
A 167-line shell script turns each hero and feature photo into WebP variants at 480, 800, 1200 and 1920 pixels, with optional AVIF. Eight images have been processed so far. The pages do not reference these variants yet; wiring them in with srcset is the next performance step, and we do not count it as shipped.
Rooms, restaurant, spa, schema, a dark mode and a WhatsApp booking flow.
Every page, piece of structured data and feature in the build, grouped by what it does. Items in the last group come from the licensed theme and are listed so the line between the theme and RAIN's work stays clear. Hover any item for what it does.
- Home
- About
- Rooms overview
- Single room
- Double room
- Triple room
- Suite Azur
- Restaurant
- Spa & Wellness
- Pool
- Gallery
- News
- Contact
- Privacy policy
- Terms
- Cookie policy
- 404 page
- Offline page
- Hotel
- Amenity features
- Restaurant
- Spa
- Room offers
- Bed details
- FAQPage
- BreadcrumbList
- Tourist attractions
- WebSite + SearchAction
- Blog
- ImageGallery
- Keyword-led titles
- Canonical URLs
- hreflang
- sitemap.xml
- AI-crawler robots.txt
- Parameter blocking
- Open Graph cards
- Meta keywords & descriptions
- Check Availability card
- Nights calculator
- Remembered dates
- WhatsApp booking request
- Floating WhatsApp button
- Direct-booking FAQ
- Protected contact form
- Cookie banner
- Consent Mode v2
- Gated GA4
- Essential-only option
- Dated consent record
- Light mode
- Dark mode
- Follow system
- Self-injected toggle
- Stored preference
- theme-color sync
- Token override
- Web app manifest
- Service worker
- Offline fallback
- Critical CSS
- Immutable caching
- Image variant script
- Clean URLs
- Versioned cache
- HTTPS + apex redirect
- HSTS preload
- Content Security Policy
- Permissions-Policy
- COOP / CORP
- X-Frame-Options
- Hidden server banners
- Dotfile block
- Honeypot field
- Per-IP rate limit
- Ken Burns hero
- Room carousels
- Filterable gallery
- Lightbox
- Video pop-up
- Parallax sections
- Date picker
- Gold & serif styling
83 pages, schema types and features, 75 of them added or rewritten by RAIN on top of a licensed theme.
The polish of a premium theme, the plumbing of a production site.
An independent hotel usually chooses between living on the OTAs, buying a theme and stopping there, or running a WordPress or hosted-builder site. Hotel Azur takes the theme's look and adds what those options leave out.
| Hotel Azur | Theme as delivered | WordPress + plugins | Hosted builder | |
|---|---|---|---|---|
| Hotel, room and FAQ JSON-LD | ✓ | — | ○ | ○ |
| WhatsApp booking request with dates and nights | ✓ | — | ○ | ○ |
| Cookie banner with Consent Mode v2 | ✓ | — | ○ | ○ |
| Light, dark and follow-system theme | ✓ | — | ○ | — |
| Installable PWA with offline page | ✓ | — | ○ | — |
| HSTS, CSP and hardened headers | ✓ | — | ○ | ○ |
| AI-crawler-friendly robots.txt | ✓ | — | ○ | ○ |
| No database or admin login to attack | ✓ | ✓ | — | ○ |
| Rate-limited, bot-trapping contact form | ✓ | ○ | ○ | ✓ |
| Premium hotel design on day one | ✓ | ✓ | ○ | ○ |
| Owned code, no platform subscription | ✓ | ✓ | ○ | — |
A theme turned into a production hotel site, with a direct line to reception.
The site was committed as production-ready on 1 June 2026 and is set up for hotelazur.ma: 23 English pages, hotel-specific JSON-LD on 18 of them with 21 FAQ answers in schema, a hardened Apache configuration, an installable PWA with an offline page, a light, dark and follow-system theme the original theme never had, and a consent-aware conversion suite on 22 pages that turns a guest's dates into a ready-to-send WhatsApp booking request. The design remains the licensed theme's; the structure, data, security, theming and conversion layer around it are RAIN's.
We hold no traffic, ranking or booking figures for the site and claim none. The clean-up list is short and specific: wire the generated WebP variants into the pages with srcset, replace the theme's leftover placeholder text on the pricing cards and two template pages, fix duplicate title tags on four pages, take the duplicate room listings out of the sitemap, and add an llms.txt file. French and Arabic versions are the obvious next step for a Casablanca hotel, and the hreflang set-up is already in place to receive them.
Hotel Azur Casablanca — FAQ
No. The site is built on a licensed luxury-hotel HTML theme, which provides its layout, typography, gold palette and sliders. RAIN customised the theme into the hotel's own site and extended it with structured data, a dark mode, a PWA, server hardening, a consent banner and a WhatsApp booking flow.
A Check Availability card under the homepage hero takes arrival and departure dates and the number of guests, works out the number of nights and opens WhatsApp with a prefilled booking request to the hotel. There is no booking engine or OTA in between; reception answers the request directly.
18 of the 23 pages carry JSON-LD written for a hotel: a Hotel node with star rating, room count, price range, coordinates, opening hours and 33 amenities, plus Restaurant, a spa as HealthAndBeautyBusiness, 13 room offers with bed details, 21 FAQ answers, breadcrumbs and nearby tourist attractions.
Yes. A GDPR cookie banner offers full or essential-only consent and is wired to Google Consent Mode v2. Google Analytics 4 measures nothing until the visitor has accepted.
The site was committed as production-ready on 1 June 2026. RAIN holds no traffic, ranking or booking data for it and makes no performance claims.
Yes. RAIN builds and extends hotel and hospitality sites from Casablanca, either from a licensed theme like this one or as a custom design. Marketing sites typically take 3 to 6 weeks, and fixed-scope projects start at $10,000.