Today I learned how to build a dual-language landing page

Today, I built an English and a German landing page for my new product Yes But Not For Long, using good old Apache behind nginx.

The Apache web server delivers the correct version of the page automatically, depending on the visitor's browser language setting. Additionally, the visitor can switch manually between English and German with one click.

It wasn't easy to figure out the correct settings for .htaccess and index.html.var so that index.en.html and index.de.html are selected correctly.


AddHandler type-map .var
MultiviewsMatch Any

Options +MultiViews

DirectoryIndex index.html.var

LanguagePriority en de
ForceLanguagePriority Fallback


URI: index.html

Content-language: en
Content-type: text/html
URI: index.en.html

Content-language: de, de-de, de-at, de-ch, de-li, de-lu
Content-type: text/html
URI: index.de.html



I always love to get questions and feedback here. And, oh yes, sign-ups are also welcome, of course! 😎👋✅

  1. 1

    OK, and today I learnt about hreflang and canonicalization to have correct settings for SEO. See these pages here:

  2. 1

    Slick. I've been using content management systems so long it's nice to see how this is implemented and supported via htaccess and browser language settings. :thumbsup:

Trending on Indie Hackers
How did you get your idea? 29 comments I'm the co-founder of Audiomack (20 million users monthly). AMA! 17 comments Top low code & no-code tools for SaaS & App Creation… 👷🏾‍♂️ 16 comments Acquisition Channel Opportunities: Native ads, Pinterest, Short video 11 comments I made 1300 Free Geometric shapes 10 comments I'm writing a book about how my co-founder and I bootstrapped our SaaS to $50k—with 0 employees. Here's the 1st chapter (it's free) 6 comments