How do I set up 301 redirects?

Created by Admin Situs Desain, Modified on Tue, 8 Apr at 10:56 AM by Vivian Lim

A 301 redirect is a permanent redirect from one URL to another. It helps maintain your SEO rankings when URLs change and ensures users and search engines are sent to the correct page.

How to set it up:

  1. Via Server Configuration

    • Apache: Use the .htaccess file

      apache
      CopyEdit
      Redirect 301 /old-page.html https://www.example.com/new-page.html
    • Nginx: Add to your site’s config file

      nginx
      CopyEdit
      rewrite ^/old-page.html$ https://www.example.com/new-page.html permanent;
  2. Via CMS Plugin
    If you use WordPress, you can use plugins like Redirection, Yoast SEO, or Rank Math to easily set up 301 redirects without code.

  3. Via Hosting Panel
    Some hosting services (like cPanel) offer a Redirects tool under Domain settings where you can add 301 redirects through the dashboard.

  4. Test the Redirect
    After setting up, test your redirect using tools like httpstatus.io to ensure it’s working properly.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article