When we write articles, we may inevitably encounter times when we need to jump to external links, but jumping directly to external links may be demoted by search engines. What should we do? ? So here are two very simple external link jump methods to solve this problem.
1. Open Editplus and create a new PHP file, copy and paste the following code, then save it as go.php and upload it to the root directory of the website
Then the jump format is: {this site address} /go.php?url={External link address}, for example:
//m.sbmmt.com/go.php?url=https://www.baidu.com/
2. Open Editplus and create a new PHP file, copy and paste the following code, then save it as go.php and upload it to the root directory of the website.
The resulting form is {this site address}/go.php?{external link address}. Compared with the first one, the url= is removed and is slightly shorter.
Note: Finally, don’t forget to add: Disallow: /go.php? to the robots.txt file to prevent search engines from crawling go.php, otherwise it will have no effect.
For more wordpress related technical articles, please visit the wordpress tutorial column to learn!
The above is the detailed content of How to redirect external links in wordpress. For more information, please follow other related articles on the PHP Chinese website!