url wordpress_什么是WordPress中的SEO友好URL结构

url wordpress

Have you ever wondered what’s the most SEO friendly permalink structure in WordPress? We’re often asked this question by new users. That’s because in the past, the default WordPress URL structure was not SEO friendly at all. However that’s changed now. In this article, we will explain WordPress SEO friendly URLs, and how you can customize your WordPress permalinks.

您是否想过WordPress中最SEO友好的永久链接结构是什么? 新用户经常问我们这个问题。 这是因为过去,默认的WordPress URL结构根本不是SEO友好的。 但是,现在更改了。 在本文中,我们将说明WordPress SEO友好的URL,以及如何自定义WordPress永久链接。

SEO Robot
什么是SEO友好网址? (What is a SEO Friendly URL?)

Before we go too deep into WordPress permalinks, it’s important that we define what is a SEO Friendly URL.

在我们深入研究WordPress永久链接之前,重要的是定义什么是SEO友好URL。

SEO Friendly URLs contain keywords that explain the article, and they’re easy to read by both humans and search engines. They also improve your chances to rank higher in search engines.

SEO友好URL包含解释文章的关键字,并且人类和搜索引擎都易于阅读。 它们还可以提高您在搜索引擎中排名更高的机会。

Example of a SEO friendly URL:

SEO友好URL的示例:

https://www.wpbeginner.com/how-to-install-wordpress/

https://www.wpbeginner.com/how-to-install-wordpress/

So what does a non-SEO friendly URL look like?

那么,非SEO友好的URL是什么样的?

https://www.wpbeginner.com/?p=10467

https://www.wpbeginner.com/?p=10467

By default, WordPress now uses the post name in the URL which is the most SEO friendly URL structure.

默认情况下,WordPress现在使用URL中的帖子名称,这是对SEO最友好的URL结构。

So why do beginners still ask us for best permalink structure?

那么,为什么初学者仍然要求我们提供最佳的永久链接结构?

That’s because in the past, WordPress did not use pretty URLs also known as permalinks. The default used to be the non-SEO friendly example that we shared above.

这是因为在过去,WordPress并未使用漂亮的URL(也称为永久链接)。 默认曾经是我们上面共享的非SEO友好示例。

This was changed in WordPress 4.2. If you recently installed WordPress, then your site URLs are SEO friendly.

这已在WordPress 4.2中更改。 如果您最近安装了WordPress ,那么您的站点URL是SEO友好的。

You can easily verify your permalink settings in your WordPress admin area.

您可以在WordPress管理区域中轻松验证永久链接设置。

永久链接设置页面介绍 (The Permalink Settings Page Explained)

In WordPress, links are called Permalinks (short for permanent links). You’ll see the term permalink structure and URL structure being used interchangeably.

在WordPress中,链接称为“ 永久链接” (永久链接的缩写)。 您将看到术语永久链接结构和URL结构可互换使用。

First thing you need to do is to visit the Permalinks settings page in your WordPress admin area.

您需要做的第一件事是访问WordPress 管理区域中的Permalinks设置页面。

Simply click on Settings link in the admin menu and then click on Permalinks. This will take you to a page that looks like this:

只需单击管理菜单中的“设置”链接,然后单击“ 永久链接” 。 这将带您进入如下页面:

Permalink settings page in WordPress

As you can see there are number of choices available.

如您所见,有很多选择。

  • Plain平原 https://www.wpbeginner.com/?p=123https://www.wpbeginner.com/?p=123
  • Day and name日期和名称 https://www.wpbeginner.com/2016/01/22/sample-post/https://www.wpbeginner.com/2016/01/22/sample-post/
  • Month and name月份和名称 https://www.wpbeginner.com/2016/01/sample-post/https://www.wpbeginner.com/2016/01/sample-post/
  • Numeric数字 https://www.wpbeginner.com/archives/123https://www.wpbeginner.com/archives/123
  • Post name职务名称 https://www.wpbeginner.com/sample-post/https://www.wpbeginner.com/sample-post/
  • Custom Structure定制结构
    Choose your own URL structure using available tags.
    使用可用的标签选择您自己的URL结构。

Let us explain these options a bit, and how useful they are for users and SEO.

让我们稍微解释一下这些选项,以及它们对用户和SEO的有用性。

The first option which is called plain used to be the default WordPress URL structure. This is not an SEO friendly option.

第一个选项称为Plain,以前是默认的WordPress URL结构。 这不是SEO友好选项。

The day and name option is somewhat SEO friendly as it has the post name in it. However, with dates, the URL becomes too lengthy. But more importantly after some time your content seems outdated, even if you regularly update it. Similarly, the month and name option also runs the risk of being dated.

day and name选项在某种程度上对SEO友好,因为其中包含职位名称。 但是,使用日期时,URL太长。 但是更重要的是,经过一段时间后,即使您定期对其进行更新,您的内容也似乎已过时。 同样,月份和名称选项也存在过时的风险。

However if you’re a news publication, then you want to have the dates in your URL to show the recency and improve the user experience.

但是,如果您是新闻出版物,则希望在URL中添加日期以显示新近度并改善用户体验。

In our opinion, those two structures are only good for news sites. Business sites that are hoping to create ever-green content should avoid it.

我们认为,这两种结构仅对新闻站点有用。 希望创建常绿内容的商业网站应避免使用它。

Post name option is the most SEO friendly because it is short and pretty.

职位名称选项是最SEO友好的,因为它又短又漂亮。

If you are running a larger publication, then you can use a custom structure that can also be SEO friendly.

如果您正在运行较大的出版物,则可以使用也可以SEO友好的自定义结构。

At WPBeginner, We use a custom permalink structure that adds a category name along with the post name in the URL. Because our site is large and contain thousands of articles, it suits us very well. You will see larger publications follow a similar URL structure.

在WPBeginner,我们使用自定义的永久链接结构,该结构在URL中添加了类别名称和帖子名称。 由于我们的网站很大,并且包含数千篇文章,因此非常适合我们。 您将看到较大的出版物遵循类似的URL结构。

In order to use a custom URL structure, you will need to add special tags in the custom structure box. For example, we use:

为了使用自定义URL结构,您将需要在自定义结构框中添加特殊标记。 例如,我们使用:

/%category%/%postname%/

/%category%/%postname%/

Notice how each tag is wrapped between percent signs. Also notice the trailing slashes / before, after, and between the tags.

注意每个标签是如何包装在百分号之间的。 还要注意标记之前,之后和之间的斜杠/

使用可用标签创建自定义URL结构 (Creating Custom URL Structure with Available Tags)

For the best results, we recommend using the options we mentioned above. You can copy the URL structure we use on WPBeginner or choose the post name as your URL structure.

为了获得最佳结果,我们建议使用上面提到的选项。 您可以复制我们在WPBeginner上使用的URL结构,或选择帖子名称作为您的URL结构。

However, there are plenty of other combinations you can create using tags. Here is a list of tags that you can use to create your own custom URL structure:

但是,您可以使用标签创建许多其他组合。 以下是可用于创建自己的自定义URL结构的标记列表:

  • %year% – The year of the post, four digits, for example 2016.%year% –帖子的年份,四位数,例如2016。
  • %monthnum% – Month of the year, for example 05%monthnum% –一年中的月份,例如05
  • %day% – Day of the month, for example 28
  • %day% –每月的某天 ,例如28
  • %hour% – Hour of the day, for example 15%hour% –一天中的小时,例如15
  • %minute% – Minute of the hour, for example 43%minute% –小时,例如43
  • %second% – Second of the minute, for example 33%second% –分钟,例如33
  • %postname% – A sanitized version of the title of the post (%postname% –帖子标题的净化版本(“编辑帖子/页面”面板上的“ post slug field on Edit Post/Page panel). For example, if your post title is This Is A Great Post! It would become this-is-a-great-post in the URL.帖子条目”字段)。 例如,如果您的帖子标题是“这是很棒的帖子”! 这将成为URL中的重要帖子。
  • %post_id% – The unique ID # of the post, for example 423%post_id% –帖子的唯一ID号,例如423
  • %category% – A sanitized version of the category name (category slug field on New/Edit Category panel). %category% –类别名称的净化版本(“新建/编辑类别”面板上的“类别标签”字段)。 Nested sub-categories appear as nested directories in the URI.嵌套子类别在URI中显示为嵌套目录。
  • %author% – A sanitized version of the author name.%author% –作者名称的经过净化的版本。

Don’t forget to click on the save changes button after choosing your permalink structure.

选择永久链接结构后,不要忘记单击“保存更改”按钮。

As soon as you press the save changes button, WordPress will automatically update your site’s .htaccess file and your site will immediately start using the new URL structure.

按下保存更改按钮后,WordPress将自动更新您站点的.htaccess文件,并且您的站点将立即开始使用新的URL结构。

警告:关于已建立站点的重要说明 (Warning: Important Note for Established Sites)

If your site has been running for more than 6 months, then please don’t change your permalink structure.

如果您的网站已运行6个月以上,则请不要更改永久链接的结构。

You don’t have to use the same structure that we used.

您不必使用我们使用的相同结构。

By changing your permalink structure on an established site, you will lose all of your social media share count and run the risk of losing your existing SEO ranking.

通过更改已建立站点上的永久链接结构,您将失去所有社交媒体共享计数,并冒失去现有SEO排名的风险。

If you must change your permalink structure, then hire a professional, so they can setup proper redirects. You’ll still lose your social share counts on the pages.

如果必须更改永久链接结构,请雇用专业人员,以便他们可以设置适当的重定向。 您仍然会丢失页面上的社交份额计数。

There’s only one exception to this rule. If your site is using the plain URLs, then no matter how old it is, you should update the URL structure for better SEO. Yes, you will still lose social share counts, but the benefits far outweigh that.

此规则只有一个例外。 如果您的网站使用的是纯URL,则无论它有多旧,都应更新URL结构以获得更好的SEO。 是的,您仍然会失去社会份额数,但收益远不止于此。

We hope this article helped you create a SEO friendly URL structure for your WordPress site. You may also want to see our guide on categories vs tags – SEO best practices for sorting your content.

我们希望本文能帮助您为WordPress网站创建SEO友好的URL结构。 您可能还希望查看有关类别与标签的指南-SEO最佳实践,用于对内容进行排序

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/seo-friendly-url-structure-for-wordpress/

url wordpress

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值