how to change author url slug and base in wordpress

How to Change Author URL Slug and Base in WordPress (Ultimate Guide)

How to Change Author URL Slug and Base in WordPress (Ultimate Guide)

Hi everyone, I’m Naveed Ahmed, and I’ve been working with WordPress for over 15 years. I’ve seen a lot of changes in the platform, but one thing that’s always stayed the same is the importance of having clean, SEO-friendly URLs. Today, we’re going to dive into a powerful aspect of WordPress URL customization – how to change the author URL slug and base. This can significantly improve your website’s organization and boost your author profiles in search results.

You’re likely familiar with how WordPress allows you to customize permalinks for posts, pages, and categories. But, by default, there isn’t a built-in way to change author URLs. Fortunately, with a few simple steps and a handy plugin, you can create custom author URLs that are both user-friendly and optimized for search engines.

What Is a URL Slug and URL Base?

Before we jump into the how-to, let’s quickly define what we mean by “slug” and “base” in the context of WordPress URLs.

  • Slug: The slug is the user-friendly part of a URL that identifies a specific page or post. It’s usually a shortened version of the title, using hyphens instead of spaces.
  • Base: The base refers to the part of the URL that comes before the slug. For author pages, the default base is “/author/.” This base determines the structure of your author URLs.

For example, in the URL “https://example.com/author/syed-balkhi/”, “syed-balkhi” is the slug, and “/author/” is the base.

While you can easily change slugs and bases for posts, pages, categories, and tags, by default, WordPress doesn’t offer the same flexibility for author URLs. This is where the plugin we’ll discuss comes in.

Changing the Author Slug in WordPress

Let’s start with the most common customization: changing the author slug. This allows you to make author URLs more unique and SEO-friendly.

  1. Install the “Edit Author Slug” Plugin: The first step is to install and activate the “Edit Author Slug” plugin. You can find it in the WordPress plugin directory, or directly install it from your WordPress dashboard. For a detailed guide on installing plugins, you can check out my post on how to install a WordPress plugin.
  2. Access the User Profile: Go to the “Users” menu in your WordPress dashboard, then select “All Users.” Click on the “Edit” link next to the user whose slug you want to change.
  3. Edit the Author Slug: On the “Edit User” screen, scroll down to the “Edit Author Slug” section. Here, you’ll see a range of options for the author slug, including:
    • Using the username as the slug
    • Using the display name as the slug
    • Creating a custom slug
  4. Update and Preview: Once you’ve chosen your desired slug, click on the “Update User” button. Visit the author page on your website to preview the changes.

Now, when you click on the author’s name in a post to see their archive, you’ll see the new slug in action.

Changing the Author Base in WordPress

Sometimes, you might want to change the author base itself, not just the slug. For instance, instead of “/author/”, you might prefer “/contributors/” or “/writers/.”

  1. Access the “Edit Author Slug” Settings: Go to “Settings” in your WordPress dashboard and select “Edit Author Slug.” This is the plugin’s settings page.
  2. Modify the Author Base: You’ll find a field to change the author base. You can enter your desired base URL. You can also choose different bases for different user roles if needed.
  3. Save Changes and Preview: Click on the “Save Changes” button to apply your settings. Visit the author page again to see the new base in action.

It’s important to note that changing the author base can affect the structure of your author pages significantly. If your website already has a lot of content, make sure to set up redirects to avoid broken links, as we’ll discuss next.

Setting Up Redirects for SEO Purposes

Changing author slugs and bases on an established website can have a negative impact on SEO. This is especially true if your author archives are already indexed by search engines. Visitors who come to your old author pages from search engines will encounter a 404 error (page not found) if the old URLs are not redirected properly.

To avoid this, it’s crucial to set up redirects from the old URLs to the new ones. Here’s how to do it using the popular Redirection plugin:

  1. Install and Activate the “Redirection” Plugin: Install and activate the “Redirection” plugin from the WordPress plugin directory, or download it from the plugin’s website.
  2. Access the Redirection Page: Go to “Tools” in your WordPress dashboard and select “Redirection.” The plugin’s setup wizard will guide you through the initial setup process.
  3. Add a New Redirection: On the Redirection page, scroll down to the “Add new redirection” section. You’ll need to provide the following information:
    • Source: Enter the old author page URL (the one with the previous slug and base).
    • Target: Enter the new author page URL (the one with the updated slug and base).
  4. Save the Redirection: Click on the “Add Redirect” button to save the redirection rule. The plugin will now automatically redirect visitors from the old URL to the new one.

If you also changed the author base, you’ll need to set up dynamic redirects. This involves using regular expressions to match any URL with the old base and redirect it to the new base. For example, if you changed the base from “/author/” to “/contributors/”, the redirection rules would look like this:

  • Source: https://example.com/author/(.*)$
  • Target: https://example.com/contributors/$1

The “$1” in the target URL refers to the content matched by the regular expression in the source URL. In this case, it will capture the author slug, ensuring the redirect works correctly.

You can also use other plugins, such as the All in One SEO (AIOSEO) plugin, to manage redirects. AIOSEO offers a powerful Redirection Manager feature, which can make setting up redirects easier. Plus, AIOSEO provides automatic 404 error tracking to help you identify any broken links on your website.

Expert Guides on WordPress Permalinks URLs

Here are some related articles to help you understand permalinks and URLs in WordPress better:

Conclusion

Changing author URL slugs and bases can significantly improve your website’s structure and SEO. By following the steps outlined in this guide, you can create custom author URLs that are both user-friendly and search-engine optimized. Don’t forget the importance of setting up redirects to avoid broken links and maintain your website’s SEO ranking.

If you’re interested in learning more about WordPress, SEO, or other tech news, feel free to visit my website: www.naveedahmed.me.

FAQs

How do I know if my author pages are indexed by search engines?

You can check if your author pages are indexed by using Google Search Console or similar tools. Enter your author URL into the search bar, and if it appears in the results, it’s indexed.

What if I’m using a different plugin for redirects?

You can use any plugin that supports redirect rules. Most popular SEO plugins, like Yoast SEO or Rank Math, have redirection features. The process of setting up redirects might vary slightly depending on the plugin you use.

Can I change the author slug and base for specific user roles?

Yes, the “Edit Author Slug” plugin allows you to set different author bases for different user roles. This is helpful if you have different types of contributors on your website.

Will changing author URLs affect my website’s traffic?

If you set up redirects properly, you shouldn’t see a significant drop in traffic. However, it’s always a good idea to monitor your website’s analytics after making changes to ensure there are no unexpected issues.

What if I’m not comfortable using plugins?

You can change the author base using code in your theme’s “functions.php” file. However, this approach requires some technical knowledge and should only be used if you’re familiar with WordPress development.

Can I use a custom structure for my author URLs?

Yes, you can create custom structures using the “Custom Structure” option in WordPress’s permalink settings. However, this might require some additional code or configuration to ensure it works properly for author pages.

What are some best practices for choosing author slugs?

Keep your author slugs short, descriptive, and easy to read. Avoid using underscores or special characters. Use hyphens to separate words.

How often should I change my author URLs?

You should only change author URLs if you have a good reason, such as improving SEO or simplifying your website’s structure. Avoid frequent changes, as they can negatively impact your website’s SEO and user experience.

What are some alternatives to using the “Edit Author Slug” plugin?

You can use a combination of custom code and a plugin like “Redirection” to achieve similar results. However, the “Edit Author Slug” plugin provides a more streamlined and user-friendly solution.

Can I use a different plugin to manage redirects?

Yes, you can use other plugins, such as “Redirection” or “Broken Link Checker,” to manage redirects. The plugin you choose will depend on your specific needs and preferences.

Posted in All
Need help for wordpress ?
Contact me
https://whatreligionisinfo.com/ https://howtobakeandcook.com/ https://howdidcelebdie.com/