0

How to make a redirect link in wordpress.

My site has two domain.

I just wanted to set 1 link only and the redirect link is from domain A to domain B.

I want to make a redirect link from enter image description here

1
  • URL redirection is best handled via web server configuration or DNS zone settings. As such, your question may be considered as "off-topic" for our site, unless there is some reason that you may not configure the redirect by the means listed above. I'd recommend poking around in your host and domain registrar's dashboards to see what settings are available to you. Spend a little time researching DNS zone redirects, as well as the configuration files for your webserver (if your WordPress installation is hosted on Apache, you'll be particularly interested in .htaccess and RewriteRule)
    – bosco
    Sep 19 '18 at 16:05
0

Check out 301 redirect plugin https://wordpress.org/plugins/simple-301-redirects/

OR

Add redirect rule in to .htaccess file

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301,NC]

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.