Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Troubleshooting

Why Is Your WordPress Link Not Working? Causes and Fixes

Why Is Your WordPress Link Not Working? Causes and Fixes

Short answer

A WordPress link usually fails because the URL is missing https:// or has a typo, the target page moved or is still a draft, or permalink rules need resetting. If clicking does nothing, an overlay or a JavaScript error is often blocking it. Check the real link address first.

Key takeaways

  • Copy the real link address first to see what the browser is using.
  • A missing https:// turns an outside link into a broken relative link.
  • If every page except home is 404, re-save Settings > Permalinks.
  • Migrations leave old domain links in content until you search and replace.
  • Clicks that do nothing usually mean an overlay or a script error.

A WordPress link usually fails because the URL is typed wrong, the target page moved, permalinks need resetting, or something on the page blocks the click.

Start by describing what actually happens when you click. The symptom points to the cause much faster than guessing:

  • Nothing happens: an overlay, script or empty link field is blocking the click.
  • 404 page: the URL is wrong, the page moved, or permalinks are broken.
  • Goes to the wrong page: a relative URL, an old domain or a redirect is involved.
  • Works for you but not visitors: caching or login-only content is the likely reason.

Right-click the link and choose Copy link address, then paste it somewhere you can read it. Seeing the real URL solves a surprising number of cases.

Is the URL itself correct?

The most common cause is a URL missing https:// at the start, which makes the browser treat it as a path on your own site instead of an outside address.

If you type www.example.com into the link field, WordPress may save it as a relative link. The browser then sends visitors to yoursite.com/www.example.com, which returns a 404.

Always paste the full address, starting with https://. Copy it from the browser address bar of the target page so nothing is missing.

Look for these other typing problems:

  • Spaces at the start or end, which can show up as %20 in the URL.
  • A missing or extra slash between the domain and the path.
  • Curly quotes or odd characters pasted from a word processor.
  • http instead of https on a site that only serves secure pages.

The MDN reference for the a element explains how browsers handle absolute and relative link addresses.

To add or edit a link cleanly in the block editor, our guide on adding a hyperlink in WordPress shows each step.

Internal links return 404 when the target page was deleted, its slug changed, it is still a draft, or your permalink rules stopped working on the server.

A 404 status means the server could not find anything at that address. Open the target page in the dashboard and compare its current URL with the link.

If you renamed a page, WordPress often redirects the old slug for posts, but not always for pages or custom post types. Update the link, or add a redirect from the old URL to the new one.

Drafts, private posts and scheduled posts return 404 to logged-out visitors. Publish the page, or test the link in a private window to see what visitors see.

If every page except the homepage returns 404, the permalink rewrite rules are broken, and re-saving the permalink settings usually fixes it in seconds.

Go to Settings > Permalinks and click Save Changes without changing anything. This flushes the rewrite rules and, on Apache servers, rewrites the .htaccess file.

The Permalinks settings screen documentation explains each structure option.

If saving does not help, the server may not allow rewrite rules, or the .htaccess file may not be writable. Our guide on fixing permalinks that are not working covers Nginx rules too.

Our guide on flushing permalinks explains the other ways to reset rewrite rules.

Yes, after a migration or domain change, links saved in posts, menus and widgets often still point to the old domain, a staging address or localhost.

WordPress stores full URLs inside post content. Moving the site does not rewrite them on its own.

Use a search and replace tool that handles serialized data to swap the old domain for the new one, such as the WP-CLI search-replace command. Take a database backup first, because a wrong replacement affects every page.

Our guide on fixing broken links after a migration walks through the safe way to do this. Also check Settings > General, where the WordPress Address and Site Address must both use the new domain.

When a click does nothing at all, an invisible element is usually covering the link, a script is intercepting clicks, or the link has no address saved.

Open your browser's developer tools and right-click the link, then choose Inspect. If the highlighted element is a div or overlay instead of the a tag, something sits on top of it.

Common culprits include:

  • A transparent header, popup or cookie banner layered over content.
  • A page builder section with a negative margin overlapping the button.
  • A JavaScript error that stops click handlers from running.
  • A button block or widget where the link field was left empty.

Check the browser console for red errors. A broken script from one plugin can stop menus, tabs and buttons across the page.

If the problem started after installing or updating a plugin, test for a conflict. Our plugin conflict guide explains how to isolate the plugin causing it.

Menu links break when a custom link holds an old or relative URL, or when the page linked in the menu was deleted and recreated with a new ID.

Go to Appearance > Menus, or the Navigation block in a block theme, and expand each menu item. Custom links show their URL field so you can correct it.

If you deleted a page and made a new one with the same title, the menu still points to the old one. Remove the item and add the new page again.

Our guide on linking a page to a menu in WordPress shows how to add pages and custom links correctly.

A link that works when you are logged in but fails for visitors usually points to private content or is served from an old cached copy of the page.

Logged-in administrators often bypass the page cache. Visitors get a cached version that may still have the broken link from before your fix.

Clear your caching plugin, host cache and CDN after editing links. Then test in a private browser window. Our guide on how to clear cache in WordPress lists the usual places to purge.

Membership plugins and security rules can also block some visitors from a URL. Check whether the target page needs a login or a role.

Jump links fail when the anchor name does not match the heading ID exactly, email links fail without the mailto: prefix, and file links fail when the media file was deleted.

For a jump link like #pricing, the target block must have the HTML anchor pricing set in its Advanced panel. The names are case sensitive.

Email links need mailto: before the address. Our guide on making an email link in WordPress covers the format.

For PDF and other file links, open the Media Library and confirm the file still exists at the same URL. Re-uploading a file can create a new address with a number added.

Which fix matches what you see?

Match your symptom to its likely cause, then try the first fix before moving on.

What you seeLikely causeFirst fix
Link goes to yoursite.com/www.other.comMissing https://Paste the full URL
404 on one pageSlug changed or page deletedUpdate the link or add a redirect
404 on every page but homeRewrite rules brokenRe-save Settings > Permalinks
Links point to old domainMigration left old URLsRun a safe search and replace
Click does nothingOverlay or JavaScript errorInspect element and check console
Fixed but visitors see old linkPage cachePurge all caches

Use a link checker to scan every page, because one broken link you notice usually means others exist on pages you have not checked.

A crawler or a broken link plugin lists every 404 link with the page it lives on. Fix the most visited pages first.

Our guide on finding broken links in WordPress compares plugin and external crawler options. Run a scan after every migration, domain change or large content cleanup.

You can also check your markup with the W3C Markup Validation Service if a link looks right but still misbehaves. Unclosed tags from pasted HTML can break links further down the page.

Frequently asked questions

Why does my link add my own domain in front of the URL?

The link was saved without the https prefix at the start, so the browser treats it as a path on your own site. Edit the link and paste the full address, copied from the target page address bar, so the protocol is included.

Why are all my WordPress links showing 404 except the homepage?

The rewrite rules are broken. Go to Settings, then Permalinks, and click Save Changes without changing anything. If that does not help, the server may block rewrites or the htaccess file may not be writable, which needs a server-side fix.

Why does my button link do nothing when clicked?

Either the button has no link saved, or something invisible sits on top of it. Check the button settings first, then right-click and inspect the button to see whether an overlay, popup or section is covering it.

Why did my links break after moving my site?

Post content stores full URLs, so links still point to the old domain or staging address after a move. Run a careful search and replace on the database after taking a backup, and confirm both site address settings use the new domain.

How do I check a whole site for broken links?

Use a broken link checker plugin or an external crawler. Both scan every page and list links that return errors along with the page they appear on, so you can fix the busiest pages first.

Sources

  1. The Anchor element MDN Web Docs
  2. 404 Not Found MDN Web Docs
  3. Settings Permalinks Screen WordPress.org
  4. Markup Validation Service W3C

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.