Skip to content

“Can’t find what you’re looking for” in Polylang or WPML

This is a very common issue when setting up Polylang or WPML for the first time. It usually happens because WordPress hasn’t updated its internal map (rewrite rules) to recognize the new /nn/ URL structure.

Here are the steps to fix the “Can’t find what you’re looking for” (404) error, ordered from the most likely solution to the more complex ones.


1. Flush the Permalinks (The Most Likely Fix)

When you add a language code like /nn/ to your URL structure, you must force WordPress to update its .htaccess file or internal rewrite array.

  1. Go to your WordPress Dashboard.
  2. Navigate to Settings > Permalinks.
  3. Scroll to the very bottom.
  4. Click Save Changes. (Do not change any settings, just click the button).
  5. Try reloading the Norwegian URL.

Why this works: WordPress caches URL rules to improve performance. Clicking “Save Changes” flushes this cache and registers the new /nn/ language directory that Polylang created.


2. Verify Polylang URL Modifications

If flushing permalinks didn’t work, check how Polylang is configured to handle the URL structure.

  1. Go to Languages > Settings.
  2. Click on the URL modifications module to expand it.
  3. Ensure “The language is set from the directory name in pretty permalinks” is selected (e.g., yoursite.com/nn/post-name).
  4. If you have “Hide URL language information for default language” checked, ensure that your Norwegian post is not accidentally set as the default language.
  5. Click Save Changes (and then flush permalinks again as in Step 1).

3. Check the Translation Link

Ensure the Norwegian post is actually connected to the original post and is published (not a draft).

  1. Go to Posts > All Posts.
  2. Find the original (likely Vietnamese or English) version of “Legend of Pham Ngu Lao.”
  3. Look at the pencil icon next to the Norwegian flag (Nynorsk nn).
    • If it is a Plus (+): The translation doesn’t exist yet.
    • If it is a Pencil: Click it to edit the Norwegian version.
  4. Inside the Norwegian post editor, check the Status in the right sidebar. It must say Published. If it says “Scheduled” or “Draft,” the public URL will result in a 404 error for visitors.
See also  How to stop WordPress from sending comment email notifications

4. Server-Side Caching (Nginx/Varnish/LiteSpeed)

Since you are using a custom domain structure and potentially a VPS or managed hosting:

  • Plugin Cache: If you use WP Rocket, W3 Total Cache, or Autoptimize, clear the cache.
  • Server Cache: If your host uses Nginx FastCGI cache or Varnish, purge the cache. The server might be serving an old version of the rewrite map where /nn/ did not exist yet.

5. Check for Slug Conflicts

Look closely at the URL you provided:

…/nn/legenden-om-pham-ngu-lao-kurvfletterhelten-den-uovervinnelige-generalen-fra-tran-dynastiet/

  1. Edit the Norwegian post.
  2. Check the URL Slug (Permalink) settings in the right sidebar.
  3. Ensure the slug matches exactly what is in the link. Sometimes, if the title is very long, WordPress truncates the slug, causing a mismatch between what you think the link is and what it actually is.

Leave a Reply

error: Content is protected !!