大网数据广告活动
网站运营与故障问答

"Page With Redirect" issue for index document

· 52CE 我爱测

I use the Pelican static site generator with Attila which automatically creates a page for each of my site's categories ( /categories.html ). The default configuration for Attila created category URLs - and canonicals, for each c…

问题原文

原帖链接 · John Sobanski · CC BY-SA 4.0

I use the Pelican static site generator with Attila which automatically creates a page for each of my site's categories (/categories.html).

The default configuration for Attila created category URLs - and canonicals, for each category without a trailing slash.

e.g.

https://example.com/category/coins

...vs.

https://example.com/category/coins/

This led to a Page Redirect issue:

Search Console has identified that your site is affected by 1 Page indexing issue(s). The following issues were found on your site.

Top Issues

Page with redirect
We recommend that you fix these issues when possible to enable the best experience and coverage in Google Search.

I edited my site such that the Canonical uses the full URL. If, for example, you go to

https://example.com/category/coins

The browser redirects to

https://example.com/category/coins/

And the page source includes:

<link href="https://example.com/category/coins/index.html" rel="canonical" />

In addition, I updated all my sitemaps to point to the full URL (trailing with index.html) and all internal links point to the full URL.

I then clicked Validate Fix on the Google Search Console and the validation failed.

I'm concerned that the coins path (without trailing slash) returns a 302 and not 301 response.

I really don't care if Google indexes that page, but I took a significant hit on impressions after Google alerted me to the Page with Redirect issue.

Does anyone have any suggestions on how to validate this Page with redirect issue?

已采纳解答

原帖链接 · MrWhite · CC BY-SA 4.0

The only way to successfully "validate/fix" the "Page redirect" issue is to prevent the redirect that appends the trailing slash. This would be relatively trivial to resolve on something like Apache/.htaccess, but I don't believe this is possible with Amazon S3.

The 302 (temporary) redirect is also problematic (any redirect would be problematic), but the 302 is not cached by the client, so users would be repeatedly redirected via the server every time they click on a link (even the same link). Which is what Google is warning about.

The alternative is to change your URLs throughout and use the "canonical" URL with the trailing slash. (And ignore the "Page redirect" warning in GSC.) You should not be using the URL with index.html (the index document). Including index.html in the visible URL is just not necessary and clutters the URL.

(Although if you have already exposed index.html then it may be more work to try and remove it. Although I believe Amazon S3 does support redirects.)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2023-02-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。