How to Link Posts or Pages To an External URL
Once you set up your permalinks, WordPress will use that structure in order to point browsers to content located on your server. It doesn’t matter if you left the default permalinks structure or if you customized it for SEO, your posts and page titles will automatically link to a unique URL set by WordPress. And that actually makes sense – you do want your titles to lead to the content and usually, you want your pictures to navigate to the same link. But what if you wanted to change that and redirect a user to an external URL?
Maybe it does sound a little bit crazy, but when you give it a thought, there might be situations in which you want to redirect your user to an external link even before opening the content.
For starters, maybe you want advertisements or promoted posts listed on your blogroll so you can make money. If someone paid you to promote their post, you might have that post published as your own, but instead of having the post actually hosted, you can link directly to that external link.
Or, what if you have several websites of your own? You may want to link a post/page title directly to your new page.
Page Links To plugin
If you kept reading to this point, you probably have a reason for your own why you need to redirect a post to an external URL and we’re about to show you how to do that. There’s no need to mess around with the code because there is a free, lightweight plugin already in existence.
- Go to Plugins -> Add New
- Search for “Page Links To” plugin
- Install and activate it
- Create new post/page or edit an existing one
- Scroll down to Page Links To tab
- Choose “A Custom URL” radio button
- Enter any URL you want
- Choose if you want to open link in a new tab
- Publish your post/page or update it
Your external URL is now officially active. To test if it’s working, you won’t even have to open your homepage – you can open your external link simply by hitting the “View Page” link which appeared on top of your admin panel.
Of course, the link is changed throughout the entire system. Not only your title will lead to a custom URL but also the featured image will do the same job.