https-downgrade
它能做什么
这项技能检查安全网站的链接和资源地址中是否有普通的 http 网址。适用于正在将网站迁移到 HTTPS 的开发者和网站所有者。
适用场景
- ✓当你把网站迁移到 HTTPS,而旧链接仍使用 http 的时候。
- ✓当浏览器就你页面上的混合内容发出警告的时候。
- ✓当模板中的硬编码地址使用 http 而不是 https 的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/https-downgrade/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请找出我的 HTTPS 网站上仍指向 http 地址的链接。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会扫描链接和资源标签中的 http 地址。它会建议把内部链接改为相对路径或 https 路径,并检查外部网站是否支持 HTTPS。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Do not link from HTTPS to HTTP
Linking from a secure HTTPS page to an HTTP destination creates a mixed content situation that browsers warn users about or block entirely. It also means the linked page does not receive the ranking signal passed through the HTTPS referrer. For internal links, it can cause redirect loops or broken navigation.
Quick Reference
- All internal links on an HTTPS page must point to HTTPS URLs — HTTP links trigger mixed content warnings
- External links to HTTP destinations break the security chain and may be blocked by browsers
- Use protocol-relative URLs (
//example.com) or absolute HTTPS URLs — never hardcodehttp://for internal links
Check
On pages served over HTTPS, scan all <a href> attributes for URLs starting with http:// (not https://). Flag: (1) Internal links using http:// that should use https:// or a relative path. (2) External links to third-party sites still on HTTP (flag for review — the destination may not support HTTPS). (3) Resource links (<img src>, <script src>, <link href>) pointing to HTTP URLs — these cause active mixed content warnings.
Fix
- Audit all
<a href>values in templates and content forhttp://links. - For internal links: change
http://yourdomain.com/pathto/path(relative) orhttps://yourdomain.com/path. - For external links: check if the destination supports HTTPS; update to
https://if so. - For resource links (scripts, styles, images): always use
https://or protocol-relative//. - In your CMS or database: run a search-and-replace to update stored HTTP URLs to HTTPS.
- Set up a server-level redirect from HTTP to HTTPS to catch any remaining HTTP URLs in user-generated content.
- Verify with:
grep -r 'href="http://' ./templates/or use a link auditing tool.
Explain
HTTPS is a confirmed Google ranking factor. When an HTTPS page links to HTTP resources or destinations, it downgrades the secure context, triggering browser warnings and potentially blocking content. For internal links, HTTP destinations mean an extra redirect (HTTP→HTTPS) on every navigation, slowing page loads. The ranking signal passed via the link's referrer is also diminished when crossing from HTTPS to HTTP.
Code Review
Parse all <a href>, <img src>, <script src>, and <link href> attributes. Flag any value starting with http:// (not https:// or a relative path). In JavaScript frameworks, also check for http:// in fetch(), axios, or router navigation calls. Report the count of HTTP links by category (internal, external, resource).
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/seo/https-downgrade
常见问题
什么是混合内容?
当安全页面加载或链接到不安全的 http 资源时,浏览器可能会发出警告或拦截。
哪些链接最紧急?
这项技能指出,带有 http 地址的图片、脚本和样式表会引发主动警告,因此最为重要。
对于不支持 HTTPS 的外部网站怎么办?
这项技能指出,应先检查目标网站是否支持 HTTPS,并在修改链接前进行确认。
详情
作者的原始描述
Use when auditing a site's internal and external links for protocol consistency, migrating a site from HTTP to HTTPS, or reviewing hardcoded URLs in a codebase that may use `http://` instead of `https://`.
热度
- GitHub 星标
- 75k
- 排名
- #2878
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。