Skip to content
October 23, 2025
  • Facebook
  • Twitter
  • Linkedin
  • VK
  • Youtube
  • Instagram
VR 360 LOGO

VR Agency 360- World Seo News

AA banner

Connect with Us

  • Facebook
  • Twitter
  • Linkedin
  • VK
  • Youtube
  • Instagram

Categories

  • Accessibility
  • Advertising ROI
  • AI and SEO
  • AI and web scraping integration
  • AI tools for web scraping
  • AI web scraping benefits
  • AI-powered web scraping
  • API architecture
  • API best practices
  • API design patterns
  • API development
  • API for ad campaigns
  • API for advertising
  • API for developers
  • API for exchange rates
  • API for SEO
  • API implementation
  • API integration patterns
  • API security patterns
  • Automated price scraping
  • Beginner's guide data mining
  • Best practices Gemini API
  • blog
  • Blog SEO
  • Blogging
  • Branding
  • Business currency tools
  • Business data collection AI
  • Content SEO
  • Currency API integration
  • Currency conversion API
  • Currency exchange API
  • Data extraction
  • Data extraction API
  • Data extraction for businesses
  • Data extraction methods
  • Data extraction tutorial
  • Data mining
  • Data mining techniques
  • Data mining vs data extraction
  • Data mining YouTube
  • Data Privacy
  • Duplicate content
  • E-commerce data scraping
  • E-commerce image search
  • Ecommerce SEO
  • Exchange rates API
  • Facebook
  • free seo audit
  • Gemini API
  • Gemini API tutorial
  • Google ad management
  • Google ad performance
  • Google Ads API
  • Google algorithm
  • Google Analytics
  • Google API best practices
  • Google API design
  • Google API development
  • Google API for news updates
  • Google API integration
  • Google cloud API
  • Google currency tools
  • Google data extraction
  • Google data mining
  • Google data scraping
  • Google developer tools
  • Google finance API
  • google image api
  • Google image search integration
  • google keyword research tool
  • google news api
  • Google News API benefits
  • Google News automation
  • Google rank tracker
  • Google rank tracking
  • Google scraping guidelines
  • Google scraping tools
  • Google scraping with AI
  • google search api
  • Google Search Console
  • Google SEO tools
  • Google SERP analysis
  • Google text scraping
  • Google visual search API
  • Google web scraping tips
  • Google web scraping tools
  • Gutenberg
  • Holistic SEO
  • Image recognition API
  • Internal linking
  • keyword ranking api
  • Keyword research
  • Learn text scraping
  • Link building
  • Local SEO
  • Machine learning API
  • Marketing
  • Mobile SEO
  • Monitor news in real time
  • News SEO
  • News tracking tools
  • News updates API
  • OpenGraph
  • Pinterest
  • Price comparison scraping
  • Price monitoring tools
  • Price scraping
  • Product image search
  • Product search by image
  • Python web scraping
  • Python YouTube scraping
  • Readability
  • Real-time exchange rates
  • Real-time news tracking
  • Redirects
  • RESTful API design
  • Rich Snippets
  • Schema.org
  • Scrape prices from websites
  • Security
  • SEO and WordPress news
  • SEO basics
  • SEO copywriting
  • SEO data extraction
  • SEO tools
  • SEO tools API
  • serp tracking
  • SERPHouse API
  • Shopify
  • Site structure
  • Social media
  • Software releases and updates
  • Technical SEO
  • Text data extraction
  • Text extraction tools
  • Text scraping tutorial
  • Uncategorized
  • User eXperience (UX)
  • Video data extraction
  • web scraping
  • Web scraping API
  • Web scraping for beginners
  • Web scraping prices
  • Web scraping tutorial
  • Web scraping YouTube
  • Webmaster tools
  • Website Maintenance
  • Website ranking
  • WooCommerce
  • WordPress
  • X
  • XML Sitemap
  • Yahoo ads analytics
  • Yahoo Ads Results API
  • Yahoo advertising tools
  • Yoast AI Brand Insights
  • Yoast SEO
  • Yoast SEO for Shopify
  • Yoast SEO Premium
  • YouTube API
  • YouTube data scraping
  • YouTube scraping tools
  • Home
  • AI SEO
  • Content SEO
  • Holistic SEO
  • Google SEO Tools
  • Blog
Watch Online
  • Home
  • WordPress
  • How to create a 301 redirect in WordPress
  • Redirects
  • Website Maintenance
  • WordPress

How to create a 301 redirect in WordPress

admin April 29, 2025 6 min read

Do you need to create a 301 redirect in your WordPress site? You’ve come to the right place! We’ll show you how to set up 301 redirects using three methods. Do you know if you need to use a redirect or whether a 301 redirect is right? No worries, we’ll explain that, too.

Redirects in a nutshell

The name ‘redirect’ says it all: It sends visitors traveling from a specific page to an alternative one instead. Or, if there’s no alternative, an HTTP header (similar to redirects) can make that clear to users and search engines. It’s like registering a change of address when you move house. What if an old friend visits your old home to visit you? A redirect is like a front door note telling your visitors where you live now. Any time you change a URL or delete a page, you should think about redirects.

Different redirects serve different purposes. Since this post is all about 301 redirects, let’s look at some situations where you might need to use one.

When should you use a 301 redirect?

A 301 redirect should be used when:

  • You’ve permanently deleted a page on your site, but you have another similar page you want to send users to instead
  • You’ve changed the URL of a page that was already published
  • You’re moving your site to a new domain
  • You’re changing your URL structure, e.g. changing from HTTP to HTTPS, or removing ‘www’ from the start of your URL

These are some of the more common reasons for using a 301 redirect, but other situations require redirecting, too. And besides that, there are other redirects and HTTP headers you can use in other situations. For instance, if you permanently delete a page and there is no suitable replacement or substitute you can send users to, then a 410 redirect is what you need to use. We have another post where you can read more about which redirects to use in which situations.

Option 1: Create a 301 redirect on the server

To set up a 301 redirect using .htaccess for the given example URLs, you need to add a specific line to your site’s .htaccess file, which is located in the root directory of your WordPress installation. Here’s how you can do it:

  1. Access your server. Access your site’s files using an FTP client or your web host’s file manager. You can also access and edit your .htaccess file from inside the Yoast SEO tools section.
  2. Locate the .htaccess file: The .htaccess file is usually in the root directory of your WordPress installation.
  3. Edit the .htaccess file: Open the .htaccess file with a text editor.
  4. Add the redirect rule: Insert the following line at the end of the file to create the redirect. This rule indicates that requests to /page-1 should be permanently redirected to /page-2.
Redirect 301 /page-1 /page-2
  1. Save changes: If you use an FTP client, save your changes to the .htaccess file and upload them back to your server.

Using this rule, any request to https://example.com/page-1 will be permanently redirected to https://example.com/page-2. The 301 status code indicates to search engines and browsers that the redirect is permanent. Note that this approach assumes the URLs follow the format /page-1 and /page-2 without additional subdirectories. You can adjust the path if your URLs are different.

These configurations can become unmaintainable over time, especially if you’re an avid blogger trying to improve your posts’ SEO. You must also log in to your server over FTP, edit the files, and re-upload them whenever you add a new redirect. That’s why, generally speaking, this method is not considered the way to go.

Option 2: Create a 301 redirect with Cloudflare

Most of us already use Cloudflare in one form or another, so you know that it offers a wide array of tools to help our websites perform. For instance, it comes with a Rules feature where you can set various options related to your website cache. You can also find various redirect options here; this will help you guide up redirects for everything from HTTP to HTTPS to single redirects for individual pages.

It’s easy to set up redirects through Cloudflare. Here’s how that works:

  1. Log into your Cloudflare account: Go to the Cloudflare dashboard and select your account and domain. Then, select Rules and Overview.
  2. Create a redirect rule: Select Create rule and then choose Redirect Rule. In the Rule name field, you might name it something like Redirect Page 1 to Page 2.
  3. Define the matching criteria: Set a wildcard pattern and set the Request URL to https://example.com/page-1. This means any traffic to example.com/page-1 will be matched for redirection
  4. Set the redirect parameters:
    • Target URL: Enter https://example.com/page-2 as the redirect destination.
    • Status code: Select 301 to indicate a permanent redirect.
    • Preserve query string: Decide based on your preference; enable this option if the original URL’s query string should be retained. When you choose to preserve the query string in a redirect, you keep any additional parameters that may be included in the original URL when redirecting to the new URL. Preserving the query string is often useful for tracking purposes, like retaining analytics or advertising parameters, ensuring that useful data isn’t lost during redirection.
  5. Deploy the rule:
    Click Deploy to save and activate the redirect.

Now, whenever someone visits https://example.com/page-1, they will be redirected to https://example.com/page-2 with a 301 status code, indicating a permanent move.

You can efficiently manage traffic without touching your server configuration by setting up redirects via Cloudflare. It provides flexibility for using simple patterns or more complex URL structures.

Cloudflare offers essential tools to manage the performance of your website

Option 3: Create a 301 redirect the easy way with Yoast SEO

Our Yoast SEO Premium plugin offers you a helping hand when it comes to creating these redirects. Our built-in redirect manager assists you whenever you change the URL of a post, page, or any taxonomies that may result in a possible 404 if you don’t properly redirect visitors. In addition, we also offer you an interface to edit or remove these redirects at a later point in time. The plugin also tells you when you’re about to create a redirect that will result in a redirect loop. This looping is something you want to avoid at all costs.

Here’s how you can set up a 301 redirect using Yoast SEO Premium in WordPress:

  1. Access the Yoast SEO settings: Log into your WordPress admin area and navigate to the Yoast SEO section.
  2. Open the Redirect Manager: Go to the Redirects feature in Yoast SEO Premium.
  3. Add a new redirect: Follow the steps below to create a new rule.
    • In the Old URL field, enter /page-1 as the source path.
    • In the New URL field, enter the destination /page-2 as the complete new URL.
    • Choose a 301 (Moved Permanently) from the list of redirect types.
  4. Save the Redirect: Click Add redirect, and Yoast SEO will handle the redirection.

Yoast SEO Premium also offers an option to automatically redirect deleted content. When you delete a page or post, Yoast SEO prompts you to set up a redirect to avoid broken links. This ensures visitors and search engines won’t encounter 404 errors and are smoothly directed to a relevant page.

These features are part of Yoast SEO Premium, designed to make managing redirects straightforward without manually altering code or server settings. They keep your site user-friendly and help maintain SEO performance by preventing dead links.

Adding a redirect with Yoast SEO Premium is very easy

Conclusion

Understanding how to set up 301 redirects is essential for maintaining your website’s integrity and user experience. Whether you choose Cloudflare, Yoast SEO Premium, or the .htaccess method, each approach offers a simple solution to guide visitors to the right place, preventing 404 errors and keeping your SEO rankings intact. Smoothly transitioning traffic from old links to new ones enhances usability and search visibility. Choose the best method that suits your needs and keeps your website running smoothly.

Read on: How to properly delete pages from your site »

The post How to create a 301 redirect in WordPress appeared first on Yoast.

Continue Reading

Previous: Favicons and your online brand: Make sure you stand out!
Next: WordPress 6.8: The highlights you should know about

Related Stories

Still not ready for Black Friday 2025? Here is your last minute rescue plan
9 min read
  • Ecommerce SEO
  • WordPress
  • Yoast SEO

Still not ready for Black Friday 2025? Here is your last minute rescue plan

October 16, 2025
How much does it cost to build a website?
8 min read
  • Content SEO
  • Ecommerce SEO
  • User eXperience (UX)
  • WordPress
  • Yoast SEO

How much does it cost to build a website?

September 2, 2025
Yoast SEO free vs Premium: why upgrading is worth it
13 min read
  • WordPress
  • Yoast SEO Premium

Yoast SEO free vs Premium: why upgrading is worth it

September 2, 2025

Recent Posts

  • A recap of the October 2025 SEO Update by Yoast
  • What is anchor text, and how can you improve your link texts?
  • The psychology of scannable content and bullet points
  • Still not ready for Black Friday 2025? Here is your last minute rescue plan
  • First things first: writing content with the inverted pyramid style

Recent Comments

No comments to show.

Archives

  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024

Categories

  • Accessibility
  • Advertising ROI
  • AI and SEO
  • AI and web scraping integration
  • AI tools for web scraping
  • AI web scraping benefits
  • AI-powered web scraping
  • API architecture
  • API best practices
  • API design patterns
  • API development
  • API for ad campaigns
  • API for advertising
  • API for developers
  • API for exchange rates
  • API for SEO
  • API implementation
  • API integration patterns
  • API security patterns
  • Automated price scraping
  • Beginner's guide data mining
  • Best practices Gemini API
  • blog
  • Blog SEO
  • Blogging
  • Branding
  • Business currency tools
  • Business data collection AI
  • Content SEO
  • Currency API integration
  • Currency conversion API
  • Currency exchange API
  • Data extraction
  • Data extraction API
  • Data extraction for businesses
  • Data extraction methods
  • Data extraction tutorial
  • Data mining
  • Data mining techniques
  • Data mining vs data extraction
  • Data mining YouTube
  • Data Privacy
  • Duplicate content
  • E-commerce data scraping
  • E-commerce image search
  • Ecommerce SEO
  • Exchange rates API
  • Facebook
  • free seo audit
  • Gemini API
  • Gemini API tutorial
  • Google ad management
  • Google ad performance
  • Google Ads API
  • Google algorithm
  • Google Analytics
  • Google API best practices
  • Google API design
  • Google API development
  • Google API for news updates
  • Google API integration
  • Google cloud API
  • Google currency tools
  • Google data extraction
  • Google data mining
  • Google data scraping
  • Google developer tools
  • Google finance API
  • google image api
  • Google image search integration
  • google keyword research tool
  • google news api
  • Google News API benefits
  • Google News automation
  • Google rank tracker
  • Google rank tracking
  • Google scraping guidelines
  • Google scraping tools
  • Google scraping with AI
  • google search api
  • Google Search Console
  • Google SEO tools
  • Google SERP analysis
  • Google text scraping
  • Google visual search API
  • Google web scraping tips
  • Google web scraping tools
  • Gutenberg
  • Holistic SEO
  • Image recognition API
  • Internal linking
  • keyword ranking api
  • Keyword research
  • Learn text scraping
  • Link building
  • Local SEO
  • Machine learning API
  • Marketing
  • Mobile SEO
  • Monitor news in real time
  • News SEO
  • News tracking tools
  • News updates API
  • OpenGraph
  • Pinterest
  • Price comparison scraping
  • Price monitoring tools
  • Price scraping
  • Product image search
  • Product search by image
  • Python web scraping
  • Python YouTube scraping
  • Readability
  • Real-time exchange rates
  • Real-time news tracking
  • Redirects
  • RESTful API design
  • Rich Snippets
  • Schema.org
  • Scrape prices from websites
  • Security
  • SEO and WordPress news
  • SEO basics
  • SEO copywriting
  • SEO data extraction
  • SEO tools
  • SEO tools API
  • serp tracking
  • SERPHouse API
  • Shopify
  • Site structure
  • Social media
  • Software releases and updates
  • Technical SEO
  • Text data extraction
  • Text extraction tools
  • Text scraping tutorial
  • Uncategorized
  • User eXperience (UX)
  • Video data extraction
  • web scraping
  • Web scraping API
  • Web scraping for beginners
  • Web scraping prices
  • Web scraping tutorial
  • Web scraping YouTube
  • Webmaster tools
  • Website Maintenance
  • Website ranking
  • WooCommerce
  • WordPress
  • X
  • XML Sitemap
  • Yahoo ads analytics
  • Yahoo Ads Results API
  • Yahoo advertising tools
  • Yoast AI Brand Insights
  • Yoast SEO
  • Yoast SEO for Shopify
  • Yoast SEO Premium
  • YouTube API
  • YouTube data scraping
  • YouTube scraping tools

About Author

AF themes

We mainly focus on quality code and elegant design with incredible support. Our WordPress themes and plugins empower you to create an elegant, professional and easy to maintain website in no time at all.

Trending News

A recap of the October 2025 SEO Update by Yoast 1

A recap of the October 2025 SEO Update by Yoast

October 23, 2025
What is anchor text, and how can you improve your link texts? 2

What is anchor text, and how can you improve your link texts?

October 21, 2025
The psychology of scannable content and bullet points 3

The psychology of scannable content and bullet points

October 17, 2025
Still not ready for Black Friday 2025? Here is your last minute rescue plan 4

Still not ready for Black Friday 2025? Here is your last minute rescue plan

October 16, 2025
First things first: writing content with the inverted pyramid style 5

First things first: writing content with the inverted pyramid style

October 14, 2025
What does Yoast SEO do? 6

What does Yoast SEO do?

October 11, 2025
The Flesch reading ease score: Why & how to use it 7

The Flesch reading ease score: Why & how to use it

October 6, 2025

Connect with Us

  • Facebook
  • Twitter
  • Linkedin
  • VK
  • Youtube
  • Instagram

You may have missed

A recap of the October 2025 SEO Update by Yoast
3 min read
  • Uncategorized

A recap of the October 2025 SEO Update by Yoast

October 23, 2025
What is anchor text, and how can you improve your link texts?
6 min read
  • Internal linking
  • Link building
  • SEO basics
  • Site structure

What is anchor text, and how can you improve your link texts?

October 21, 2025
The psychology of scannable content and bullet points
11 min read
  • Content SEO
  • SEO copywriting

The psychology of scannable content and bullet points

October 17, 2025
Still not ready for Black Friday 2025? Here is your last minute rescue plan
9 min read
  • Ecommerce SEO
  • WordPress
  • Yoast SEO

Still not ready for Black Friday 2025? Here is your last minute rescue plan

October 16, 2025

About VR Agency 360

Recent Posts

  • A recap of the October 2025 SEO Update by Yoast
  • What is anchor text, and how can you improve your link texts?
  • The psychology of scannable content and bullet points
  • Still not ready for Black Friday 2025? Here is your last minute rescue plan
  • First things first: writing content with the inverted pyramid style
  • Facebook
  • Twitter
  • Linkedin
  • VK
  • Youtube
  • Instagram
Copyright © All rights reserved. | DarkNews by AF themes.