Are you annoyed that your WordPress website is overrun by archive pages? Author, date, and category archives are just a few examples of pages that, if not properly handled, can cause needless bloat and perhaps hurt your SEO. I’ve had this problem myself and was wondering how to get rid of WordPress archive pages to make my website look cleaner and more organized.
I’ll walk you through the process of removing archive pages in WordPress in this guide. At the end, you’ll have a clean, optimized website that improves both its appearance and SEO performance. I promise that your website will feel a lot cleaner after you delete those pages that aren’t needed.
Why Remove Archive Pages?
Prior to delving into the “how,” let us discuss the “why.”
I was unaware that archive pages, such as those for authors, dates, and even tags, were automatically generated when I first started using WordPress. “Why would I need a page that shows all posts by date?” I wondered. Or worse, even if it’s just me, a page for each author?”
These pages generate duplicate material, which search engines dislike from an SEO perspective. They might also rank above more significant pages, which would dilute the results of your search.
You can improve the structure of your website and gain greater control over the pages that search engines index by removing these pages.
Step 1: Understand What Archive Pages You Want to Remove
Knowing which archive pages are on your website is the first step. Some of the most popular archive pages in WordPress are as follows:
- Author Archives: Shows every post written by a particular author.
- Posts are listed by date (year, month, or day) in the Date Archives.
- Posts are listed under particular categories in the category archives.
- View posts archived under a certain tag.
- Custom Taxonomies: You may also want to build archives for any custom taxonomies you’ve created.
The author and date archives were the main things that seemed superfluous to me. However, you may also wish to eliminate category or tag archives, depending on your website.
Step 2: Disable Archives via WordPress Settings (For Simple Archives)
WordPress makes it rather simple to erase a few basic archives (such as author or date archives) without the need for additional plugins.
Here’s how to go about it:
- Enter the WordPress Dashboard and log in.
- Navigate to Settings > Reading.
- Locate the Search Engine Visibility option by scrolling down.
- The option to “Allow search engines to show this site’s archives” should be unchecked.
This option prevents search engines from indexing the archive pages, but it does not completely erase them. This was useful to me, especially with the date archives that I didn’t require to be indexed.
Step 3: Use an SEO Plugin for Better Control (Yoast or Rank Math)
Yoast SEO and Rank Math are two excellent SEO plugins if you want more precise control over your archive pages. Since Yoast is so simple, I personally use it, but Rank Math is just as effective.
Here’s how to go about it:
- Yoast SEO usage instructions: Install and turn on the Yoast SEO plugin.
- Navigate to the WordPress dashboard of Yoast SEO.
- Go to Appearance > Search > Archives.
- Toggle the switch to turn off author archives in the “Author Archives” section.
- Likewise, flip the matching switch to turn off date archives.
You can choose to disable archives without completely eliminating them from your site’s structure with Yoast SEO. I personally thought this procedure was quite simple, and I was able to clean away undesirable archives in less than five minutes.
Step 4: Completely Remove Archives with Code (Advanced Users)
You’ll need to get into the code of your WordPress theme if, like me, you wish to completely remove archive pages (no redirects, no hidden sites). Although at first I was a little anxious, this is actually quite easy.
You must make changes to the functions.php file in your theme. This is the detailed instructions:
- Make a backup of your website before modifying it. This is really, really crucial!
- Access the Theme Editor by going to Appearance > WordPress dashboard.
- Locate the functions.php file in the folder containing your theme.
- In order to disable particular archive pages, add the following code:
// Disable author archives
add_action('template_redirect', 'disable_author_archives');
function disable_author_archives() {
if (is_author()) {
wp_redirect(home_url());
exit;
}
}
// Disable date archives
add_action('template_redirect', 'disable_date_archives');
function disable_date_archives() {
if (is_date()) {
wp_redirect(home_url());
exit;
}
}
I was able to erase the author and date archives fully by doing this. Nothing but gone—no hidden sites, no redirects! Using this technique guarantees that these pages are removed from your website.
Step 5: Redirect Unnecessary Archives (Using 301 Redirects)
Users (and search engines) may still attempt to access archive pages even after they have been removed. That is the use case for 301 redirects. To make sure that any attempts to visit these deleted pages are automatically routed to more crucial sections of my website, I utilized a plugin called Redirection.
This is what I carried out:
- After installing, turn on the Redirection plugin.
- Navigate via your WordPress dashboard to Tools > Redirection.
- Enter the URL of the archive you wish to redirect in the “Add New Redirect” area.
- Indicate the URL that should be sent there (typically your homepage or a related category page).
- Click “Add Redirect.”
This technique makes sure that even if someone tries to view an outdated archive, they will be directed to an appropriate website. Maintaining the user experience on my website required this.
Step 6: Test Your Site
It’s time to test your website after you’ve finished all of the previous procedures. What I do is as follows:
- Try going straight to the archive URLs (such as example.com/2023/08 or example.com/author/admin).
- To make sure that no unwanted archive pages are being indexed, use Google Search Console.
- To find any remaining archive pages on your website, use SEO tools such as Screaming Frog to crawl them.
My archive pages vanished once I took these actions, and my website felt much more put together. Additionally, since Google was no longer required to index pointless content, I saw a boost in my SEO results for the more significant pages.
Conclusion
For website owners looking to improve SEO and clean their site, removing archive pages in WordPress is a huge game changer. The procedure is simple, regardless of whether you choose to use custom code, Yoas, or basic WordPress settings for SEO. Based on my personal experience, my website is now faster, cleaner, and more organized after deleting these pages.
So, if you’ve been wondering how to get rid of archive pages in WordPress, hopefully, this detailed tutorial has helped you choose the best course of action. I promise that your website will appreciate it!
FAQ’s
Why should I remove archive pages in WordPress?
Removing archive pages helps reduce duplicate content and prevents search engines from indexing unnecessary pages, improving your site’s SEO performance.
Can I remove archives without using a plugin?
Yes, you can disable some archives through WordPress settings or by editing your theme’s code, but plugins like Yoast offer more control.
What happens if someone tries to access a removed archive?
You can set up 301 redirects to direct users to relevant pages, ensuring a smooth user experience even if they try to visit a removed archive.
Will removing archive pages impact my SEO?
Yes, but in a positive way! Removing unnecessary archive pages helps reduce duplicate content, allowing your more important pages to rank higher.
Can I remove only specific types of archive pages?
Absolutely. You can choose to remove author, date, category, or even custom taxonomy archives based on your site’s needs.