0

I want the URL to my German about-me page to be über-mich (German for "about me"):

http://www.my-website.de/über-mich

This works fine if the filename contains an umlaut:

index.php
robots.txt
über-mich.php

What keeps confusing me is how that URL should be represented in anchor and link tags in the code of the webpage. Should I use umlauts or urlencode them?

Is this correct:

<link rel="canonical" href="https://www.my-website.de/über-mich">
<a href="/über-mich">Über mich</a>

or this:

<link rel="canonical" href="https://www.my-website.de/%C3%BCber-mich">
<a href="/%C3%BCber-mich">Über mich</a>

Both links work! So which is correct? Or doesn't it matter?

1
  • 1
    Both might work, but with the first one you are leaving it up to the browser, to apply URL encoding. (Which can go wrong in some situations, depending on stuff like character encoding of the web page.) You should always apply proper URL encoding in the output you create, there is really not much of an excuse not to do so. Commented Mar 6 at 12:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.