Title: incorrect hyperlink generation: wrong root
Last modified: August 18, 2016

---

# incorrect hyperlink generation: wrong root

 *  [independentcreator](https://wordpress.org/support/users/independentcreator/)
 * (@independentcreator)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/incorrect-hyperlink-generation-wrong-root/)
 * I’m attempting to generate within-page links, in my pages (not posts). In the
   default WYSIWYG editor, I’ll click the HTML button, and create a link like `<
   a href="#myanchor">`. Upon hitting update, WordPress will save it as `<a href
   ="http://www.mydomainname.com/myinstalldir/#myanchor">`. Now, that’s not good,
   for a couple reasons.
 * 1. This page isn’t the root, so this link will exit the current page and go to
   the index page.
    2. The Blog Address, as specified in the Options panel, is [http://www.mydomainname.com](http://www.mydomainname.com),
   not [http://www.mydomainname.com/myinstalldir](http://www.mydomainname.com/myinstalldir).
   myinstalldir is only specified in the WordPress Address.
 * My current workaround is to absolutely link to [http://www.mydomainname.com/mypage/#myanchor](http://www.mydomainname.com/mypage/#myanchor).
   If I ever change page or domain name I’m going to have to do a massive search
   and replace, but other than that it mostly works. If there’s a way to generate
   purely a “#myanchor” link, however, I’d much prefer that.
 * Thanks in advance to anyone with some insight on this.

The topic ‘incorrect hyperlink generation: wrong root’ is closed to new replies.

## Tags

 * [anchor](https://wordpress.org/support/topic-tag/anchor/)
 * [hyperlink](https://wordpress.org/support/topic-tag/hyperlink/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [independentcreator](https://wordpress.org/support/users/independentcreator/)
 * Last activity: [19 years, 3 months ago](https://wordpress.org/support/topic/incorrect-hyperlink-generation-wrong-root/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
