# Redirect domain aliases to primary domain
https://netlify.cert-manager.io/* https://cert-manager.io/:splat 301!
https://cert-manager.netlify.com/* https://cert-manager.io/:splat 301!
https://cert-manager.dev/* https://cert-manager.io/:splat 301!
https://trust-manager.io/* https://cert-manager.io/:splat 301!
https://trust-manager.dev/* https://cert-manager.io/:splat 301!

# Redirect all next-docs on the main site to the release-next preview
https://cert-manager.io/next-docs/* https://release-next--cert-manager.netlify.app/docs/:splat 301!

# Redirect the 1.12 -> 1.13 update page to a page which captures all methods of upgrading 1.12
/docs/releases/upgrading/upgrading-1.12-1.13 /docs/releases/upgrading/upgrading-1.12

# Various older renamed pages
/docs/configuration/externalloadbalancer/ /docs/configuration/acme/http01/externalloadbalancer/ 301!

/docs/faq/kubed/* /docs/faq/sync-secrets/

/docs/concepts/project-maturity/ /docs/installation/supported-releases/

/docs/installation/kubernetes/ /docs/installation/supported-releases/
/docs/installation/openshift/  /docs/installation/supported-releases/

/docs/installation/uninstall/kubernetes/ /docs/installation/uninstall/
/docs/installation/uninstall/openshift/  /docs/installation/uninstall/

# In v1.6 we released 'cmctl' which is considered a better CLI experience than 'kubectl cert-manager'.
# The 'cmctl' page became the source of truth for all subcommands so old references to 'kubectl cert-manager' are redirected there.
/docs/usage/kubectl-plugin/#commands                  /docs/usage/cmctl/#commands
/docs/usage/kubectl-plugin/#approve-deny              /docs/usage/cmctl/#approve-and-deny-certificaterequests
/docs/usage/kubectl-plugin/#convert                   /docs/usage/cmctl/#convert
/docs/usage/kubectl-plugin/#create                    /docs/usage/cmctl/#create
/docs/usage/kubectl-plugin/#certificaterequest        /docs/usage/cmctl/#certificaterequest
/docs/usage/kubectl-plugin/#renew                     /docs/usage/cmctl/#renew
/docs/usage/kubectl-plugin/#status-certificate        /docs/usage/cmctl/#status-certificate
/docs/usage/kubectl-plugin/#completion                /docs/usage/cmctl/#completion
/docs/usage/kubectl-plugin/#experimental              /docs/usage/cmctl/#experimental
/docs/usage/kubectl-plugin/#certificatesigningrequest /docs/usage/cmctl/#certificatesigningrequest

# Redirects for old docs pages which used to be versioned but aren't any more
# This was done during the release of cert-manager v1.7 and so we don't need to add redirects for any newer versions

# Single source of truth for information on how to upgrade between all cert-manager versions
/v0.12-docs/installation/upgrading/* /docs/installation/upgrading/ 301!
/v0.13-docs/installation/upgrading/* /docs/installation/upgrading/ 301!
/v0.14-docs/installation/upgrading/* /docs/installation/upgrading/ 301!
/v0.15-docs/installation/upgrading/* /docs/installation/upgrading/ 301!
/v0.16-docs/installation/upgrading/* /docs/installation/upgrading/ 301!
/v1.0-docs/installation/upgrading/*  /docs/installation/upgrading/ 301!
/v1.1-docs/installation/upgrading/*  /docs/installation/upgrading/ 301!
/v1.2-docs/installation/upgrading/*  /docs/installation/upgrading/ 301!
/v1.3-docs/installation/upgrading/*  /docs/installation/upgrading/ 301!
/v1.4-docs/installation/upgrading/*  /docs/installation/upgrading/ 301!
/v1.5-docs/installation/upgrading/*  /docs/installation/upgrading/ 301!
/v1.6-docs/installation/upgrading/*  /docs/installation/upgrading/ 301!
/v1.7-docs/installation/upgrading/*  /docs/installation/upgrading/ 301!

# Release notes are similar to "upgrading" notes - we want one source of truth
/v0.12-docs/release-notes/* /docs/release-notes/ 301!
/v0.13-docs/release-notes/* /docs/release-notes/ 301!
/v0.14-docs/release-notes/* /docs/release-notes/ 301!
/v0.15-docs/release-notes/* /docs/release-notes/ 301!
/v0.16-docs/release-notes/* /docs/release-notes/ 301!
/v1.0-docs/release-notes/*  /docs/release-notes/ 301!
/v1.1-docs/release-notes/*  /docs/release-notes/ 301!
/v1.2-docs/release-notes/*  /docs/release-notes/ 301!
/v1.3-docs/release-notes/*  /docs/release-notes/ 301!
/v1.4-docs/release-notes/*  /docs/release-notes/ 301!
/v1.5-docs/release-notes/*  /docs/release-notes/ 301!
/v1.6-docs/release-notes/*  /docs/release-notes/ 301!
/v1.7-docs/release-notes/*  /docs/release-notes/ 301!

# Contributing guidelines are only really useful to view as the latest version; it's not important
# what they were for a given release, it's important what they are today.
/v0.12-docs/contributing/* /docs/contributing/ 301!
/v0.13-docs/contributing/* /docs/contributing/ 301!
/v0.14-docs/contributing/* /docs/contributing/ 301!
/v0.15-docs/contributing/* /docs/contributing/ 301!
/v0.16-docs/contributing/* /docs/contributing/ 301!
/v1.0-docs/contributing/*  /docs/contributing/ 301!
/v1.1-docs/contributing/*  /docs/contributing/ 301!
/v1.2-docs/contributing/*  /docs/contributing/ 301!
/v1.3-docs/contributing/*  /docs/contributing/ 301!
/v1.4-docs/contributing/*  /docs/contributing/ 301!
/v1.5-docs/contributing/*  /docs/contributing/ 301!
/v1.6-docs/contributing/*  /docs/contributing/ 301!
/v1.7-docs/contributing/*  /docs/contributing/ 301!

# We introduced "Supported Releases" in cert-manager 1.3. The page is only really useful in its "latest" form
/v1.3-docs/installation/supported-releases/* /docs/installation/supported-releases/ 301!
/v1.4-docs/installation/supported-releases/* /docs/installation/supported-releases/ 301!
/v1.5-docs/installation/supported-releases/* /docs/installation/supported-releases/ 301!
/v1.6-docs/installation/supported-releases/* /docs/installation/supported-releases/ 301!
/v1.7-docs/installation/supported-releases/* /docs/installation/supported-releases/ 301!

# Starting in version 0.15 we added an aboutjetstack page to the docs, and after the website refresh
# we added a new dedicated section for listing companies who offer cert-manager support
/v0.15-docs/aboutjetstack/* /support/ 301!
/v0.16-docs/aboutjetstack/* /support/ 301!
/v1.0-docs/aboutjetstack/*  /support/ 301!
/v1.1-docs/aboutjetstack/*  /support/ 301!
/v1.2-docs/aboutjetstack/*  /support/ 301!
/v1.3-docs/aboutjetstack/*  /support/ 301!
/v1.4-docs/aboutjetstack/*  /support/ 301!
/v1.5-docs/aboutjetstack/*  /support/ 301!
/v1.6-docs/aboutjetstack/*  /support/ 301!
/v1.7-docs/aboutjetstack/*  /support/ 301!
/v1.8-docs/aboutjetstack/*  /support/ 301!
/docs/aboutjetstack/*       /support/ 301!
/next-docs/aboutjetstack/*  /support/ 301!

# A series of events led to a broken URL after the website refresh, which is detailed in https://github.com/cert-manager/website/issues/952
# In short, the path for the 2022 GSoD proposal shouldn't have "index" at the end but it did for a while after the refresh.
/docs/contributing/google-season-of-docs/2022/improve-navigation-and-structure/index/ /docs/contributing/google-season-of-docs/2022/improve-navigation-and-structure/ 301!

########################
# docs.cert-manager.io #
########################

# docs.cert-manager.io was previously a separately hosted service.

# The DNS has since been redirected to point at cert-manager.io, and we maintain a list of redirects to preserve old links.
# Note that these links use the fully specified domains because they're only relevant on live
https://docs.cert-manager.io/en/latest/getting-started/index.html https://cert-manager.io/docs/tutorials/
https://docs.cert-manager.io/en/latest/tutorials/acme/index.html https://cert-manager.io/docs/tutorials/
https://docs.cert-manager.io/en/latest/ https://cert-manager.io/docs/

# This specific URL is linked to by IBM docs (https://www.ibm.com/docs/en/cloud-private/3.2.x?topic=manager-using-acme-issue-certificates)
# so we redirect it to the new cert-manager.io docs page specifically
https://docs.cert-manager.io/en/latest/tutorials/acme/http-validation.html https://cert-manager.io/docs/tutorials/acme/http-validation/
# We don't know for sure if this dns-validation tutorial ever existed in the old docs site, but redirect it anyway just in case
# since we know the equiavalent did exist for HTTP validation.
https://docs.cert-manager.io/en/latest/tutorials/acme/dns-validation.html https://cert-manager.io/docs/tutorials/acme/dns-validation/

# Issuer-specific redirects; these were mined from a wayback machine crawl of the old site:
# https://web.archive.org/web/20190802192846/http://docs.cert-manager.io/en/latest/tasks/issuers/index.html
https://docs.cert-manager.io/en/latest/tasks/issuers/setup-acme/http01/* https://cert-manager.io/docs/configuration/acme/http01/
https://docs.cert-manager.io/en/latest/tasks/issuers/setup-acme/dns01/* https://cert-manager.io/docs/configuration/acme/dns01/
https://docs.cert-manager.io/en/latest/tasks/issuers/setup-acme/* https://cert-manager.io/docs/configuration/acme/
https://docs.cert-manager.io/en/latest/tasks/issuers/setup-ca.html https://cert-manager.io/docs/configuration/ca/
https://docs.cert-manager.io/en/latest/tasks/issuers/setup-selfsigned.html https://cert-manager.io/docs/configuration/selfsigned/
https://docs.cert-manager.io/en/latest/tasks/issuers/setup-vault.html https://cert-manager.io/docs/configuration/vault/
https://docs.cert-manager.io/en/latest/tasks/issuers/setup-venafi.html https://cert-manager.io/docs/configuration/venafi/

# Fallback in case there are any pages we missed:
https://docs.cert-manager.io/en/latest/tasks/issuers/* https://cert-manager.io/docs/configuration/

# Capture historical links that reference endpoints for specfic release versions. Whilst these endpoints might not exist anymore these
# redirect rules will capture the request and route the user to the specific release-note page
https://docs.cert-manager.io/en/release-0.1/*  https://cert-manager.io/docs/release-notes/release-notes-0.1/ 301!
https://docs.cert-manager.io/en/release-0.2/*  https://cert-manager.io/docs/release-notes/release-notes-0.2/ 301!
https://docs.cert-manager.io/en/release-0.3/*  https://cert-manager.io/docs/release-notes/release-notes-0.3/ 301!
https://docs.cert-manager.io/en/release-0.4/*  https://cert-manager.io/docs/release-notes/release-notes-0.4/ 301!
https://docs.cert-manager.io/en/release-0.5/*  https://cert-manager.io/docs/release-notes/release-notes-0.5/ 301!
https://docs.cert-manager.io/en/release-0.6/*  https://cert-manager.io/docs/release-notes/release-notes-0.6/ 301!
https://docs.cert-manager.io/en/release-0.7/*  https://cert-manager.io/docs/release-notes/release-notes-0.7/ 301!
https://docs.cert-manager.io/en/release-0.8/*  https://cert-manager.io/docs/release-notes/release-notes-0.8/ 301!
https://docs.cert-manager.io/en/release-0.9/*  https://cert-manager.io/docs/release-notes/release-notes-0.9/ 301!
https://docs.cert-manager.io/en/release-0.10/* https://cert-manager.io/docs/release-notes/release-notes-0.10/ 301!
https://docs.cert-manager.io/en/release-0.11/* https://cert-manager.io/docs/release-notes/release-notes-0.11/ 301!
https://docs.cert-manager.io/en/release-0.12/* https://cert-manager.io/docs/release-notes/release-notes-0.12/ 301!
https://docs.cert-manager.io/en/release-0.13/* https://cert-manager.io/docs/release-notes/release-notes-0.13/ 301!
https://docs.cert-manager.io/en/release-0.14/* https://cert-manager.io/docs/release-notes/release-notes-0.14/ 301!
https://docs.cert-manager.io/en/release-0.15/* https://cert-manager.io/docs/release-notes/release-notes-0.15/ 301!
https://docs.cert-manager.io/en/release-0.16/* https://cert-manager.io/docs/release-notes/release-notes-0.16/ 301!

https://docs.cert-manager.io/en/release-* https://cert-manager.io/docs/release-notes/release-notes-:splat 301!
https://docs.cert-manager.io https://cert-manager.io/docs 301!
https://docs.cert-manager.io/* https://cert-manager.io/docs/:splat 302!


# Redirects arising from the Season-of-Docs-2022 re-organization of menu items and pages
#
# Moved the writing cert-manager content into the main FAQ page.
/docs/faq/style/  /docs/faq/ 301!

# Moved the syncing secrets page to the tutorials section
/docs/faq/sync-secrets/  /docs/tutorials/syncing-secrets-across-namespaces/ 301!

# Moved the information about cluster-scoped resources to the Configuration > Issuers page
/docs/faq/cluster-resource/  /docs/configuration/ 301!

# Moved troubleshooting content out of the FAQ section and into a dedicated
# troubleshooting section
/docs/faq/troubleshooting/ /docs/troubleshooting/ 301!
/docs/faq/webhook/ /docs/troubleshooting/webhook/ 301!
/docs/faq/acme/ /docs/troubleshooting/acme/ 301!

# Moved FAQ terminology page to a new reference section
/docs/faq/terminology/ /docs/reference/tls-terminology/ 301!

# Moved the cmctl documentation into a dedicated reference section
/docs/usage/cmctl/ /docs/reference/cmctl/ 301!
/docs/usage/kubectl-plugin/ /docs/reference/cmctl/ 301!

# Removed the separate kubectl-plugin installation page
/docs/installation/kubectl-plugin/ /docs/reference/cmctl/ 301!

# Demoted the cmctl x install page
/docs/installation/cmctl/ /docs/reference/cmctl/ 301!

# Rename trust to trust-manager
/docs/projects/trust/ /docs/trust/trust-manager/ 301!

# Moved pages to new devops section
/docs/usage/prometheus-metrics/ /docs/devops-tips/prometheus-metrics/ 301!
/docs/tutorials/backup/ /docs/devops-tips/backup/ 301!
/docs/tutorials/syncing-secrets-across-namespaces/ /docs/devops-tips/syncing-secrets-across-namespaces/ 301!

# Integrating the project pages into the main website
/docs/usage/istio/ /docs/usage/istio-csr/ 301!
/docs/usage/approver-policy/ /docs/policy/approval/approver-policy/ 301!
/docs/projects/istio-csr/ /docs/usage/istio-csr/ 301!
/docs/projects/csi-driver/ /docs/usage/csi-driver/ 301!
/docs/projects/csi-driver-spiffe/ /docs/usage/csi-driver-spiffe/ 301!
/docs/projects/trust-manager/ /docs/trust/trust-manager/ 301!
/docs/projects/trust-manager/api-reference/ /docs/trust/trust-manager/api-reference/ 301!
/docs/projects/approver-policy/ /docs/policy/approval/approver-policy/ 301!
/docs/projects/approver-policy/api-reference/ /docs/policy/approval/approver-policy/api-reference/ 301!

# Installation section cleanup
/docs/installation/other-tools/ /docs/installation/helm/ 301!
/docs/installation/verify/ /docs/installation/kubectl/ 301!
/docs/installation/featureflags/ /docs/installation/configuring-components/ 301!
/docs/installation/api-compatibility/ /docs/contributing/api-compatibility/ 301!

# Moved the "upgrading" and "release-notes" pages to the release section
/docs/installation/upgrading/ /docs/installation/upgrade/ 301!
/docs/installation/upgrading/* /docs/releases/upgrading/:splat 301!
/docs/release-notes/* /docs/releases/release-notes/:splat 301!
/docs/installation/supported-releases/ /docs/releases/ 301!
/docs/releases/upgrading/ /docs/releases/ 301!
/docs/releases/release-notes/ /docs/releases/ 301!

# Moved the concept pages into the main website
/docs/concepts/certificaterequest/ /docs/usage/certificaterequest/ 301!
/docs/concepts/certificate/ /docs/usage/certificate/ 301!

# Moved the external issuer section to the main issuers page
/docs/configuration/external/ /docs/configuration/issuers/ 301!

# Moved the istio-csr tutorial to its own installation page
/docs/tutorials/istio-csr/istio-csr/ /docs/usage/istio-csr/installation/ 301!

# Redirect page with incorrect date in URL
/announcements/2024/21/18/cert-manager-security-audit/ /announcements/2024/03/18/cert-manager-security-audit/ 301!

# Redirect link used in KubeCon NA 2024 video QR code (we can update the redirect in the future)
/link/kubecon-na-2024/ / 301!

# Document cert-manager.io annotations
# for an annotation `cert-manager.io/allow-direct-injection` we map to
# /docs/reference/annotations#cert-managerioallow-direct-injection
# which is an entry documenting `cert-manager.io/allow-direct-injection`
https://cert-manager.io/allow-direct-injection https://cert-manager.io/docs/reference/annotations#cert-managerioallow-direct-injection 301!
https://cert-manager.io/alt-names https://cert-manager.io/docs/reference/annotations#cert-managerioalt-names 301!
https://cert-manager.io/certificate-name https://cert-manager.io/docs/reference/annotations#cert-manageriocertificate-name 301!
https://cert-manager.io/certificate-revision https://cert-manager.io/docs/reference/annotations#cert-manageriocertificate-revision 301!
https://cert-manager.io/cluster-issuer https://cert-manager.io/docs/reference/annotations#cert-manageriocluster-issuer 301!
https://cert-manager.io/common-name https://cert-manager.io/docs/reference/annotations#cert-manageriocommon-name 301!
https://cert-manager.io/duration https://cert-manager.io/docs/reference/annotations#cert-managerioduration 301!
https://cert-manager.io/email-sans https://cert-manager.io/docs/reference/annotations#cert-managerioemail-sans 301!
https://cert-manager.io/inject-apiserver-ca https://cert-manager.io/docs/reference/annotations#cert-managerioinject-apiserver-ca 301!
https://cert-manager.io/inject-ca-from https://cert-manager.io/docs/reference/annotations#cert-managerioinject-ca-from 301!
https://cert-manager.io/inject-ca-from-secret https://cert-manager.io/docs/reference/annotations#cert-managerioinject-ca-from-secret 301!
https://cert-manager.io/ip-sans https://cert-manager.io/docs/reference/annotations#cert-managerioip-sans 301!
https://cert-manager.io/issue-temporary-certificate https://cert-manager.io/docs/reference/annotations/#cert-managerioissue-temporary-certificate 301!
https://cert-manager.io/issuer https://cert-manager.io/docs/reference/annotations#cert-managerioissuer 301!
https://cert-manager.io/issuer-group https://cert-manager.io/docs/reference/annotations#cert-managerioissuer-group 301!
https://cert-manager.io/issuer-kind https://cert-manager.io/docs/reference/annotations#cert-managerioissuer-kind 301!
https://cert-manager.io/issuer-name https://cert-manager.io/docs/reference/annotations#cert-managerioissuer-name 301!
https://cert-manager.io/private-key-algorithm https://cert-manager.io/docs/reference/annotations#cert-managerioprivate-key-algorithm 301!
https://cert-manager.io/private-key-encoding https://cert-manager.io/docs/reference/annotations#cert-managerioprivate-key-encoding 301!
https://cert-manager.io/private-key-rotation-policy https://cert-manager.io/docs/reference/annotations#cert-managerioprivate-key-rotation-policy 301!
https://cert-manager.io/private-key-secret-name https://cert-manager.io/docs/reference/annotations#cert-managerioprivate-key-secret-name 301!
https://cert-manager.io/private-key-size https://cert-manager.io/docs/reference/annotations#cert-managerioprivate-key-size 301!
https://cert-manager.io/renew-before https://cert-manager.io/docs/reference/annotations#cert-manageriorenew-before 301!
https://cert-manager.io/renew-before-percentage https://cert-manager.io/docs/reference/annotations#cert-manageriorenew-before-percentage 301!
https://cert-manager.io/revision-history-limit https://cert-manager.io/docs/reference/annotations#cert-manageriorevision-history-limit 301!
https://cert-manager.io/secret-template https://cert-manager.io/docs/reference/annotations#cert-manageriosecret-template 301!
https://cert-manager.io/subject-countries https://cert-manager.io/docs/reference/annotations#cert-manageriosubject-countries 301!
https://cert-manager.io/subject-localities https://cert-manager.io/docs/reference/annotations#cert-manageriosubject-localities 301!
https://cert-manager.io/subject-organizationalunits https://cert-manager.io/docs/reference/annotations#cert-manageriosubject-organizationalunits 301!
https://cert-manager.io/subject-organizations https://cert-manager.io/docs/reference/annotations#cert-manageriosubject-organizations 301!
https://cert-manager.io/subject-postalcodes https://cert-manager.io/docs/reference/annotations#cert-manageriosubject-postalcodes 301!
https://cert-manager.io/subject-provinces https://cert-manager.io/docs/reference/annotations#cert-manageriosubject-provinces 301!
https://cert-manager.io/subject-serialnumber https://cert-manager.io/docs/reference/annotations#cert-manageriosubject-serialnumber 301!
https://cert-manager.io/subject-streetaddresses https://cert-manager.io/docs/reference/annotations#cert-manageriosubject-streetaddresses 301!
https://cert-manager.io/uri-sans https://cert-manager.io/docs/reference/annotations#cert-manageriouri-sans 301!
https://cert-manager.io/usages https://cert-manager.io/docs/reference/annotations#cert-manageriousages 301!

# There are cnames to cert-manager.io in https://github.com/cert-manager/infrastructure/blob/2d77f6b97249f4d41cd5547ad90f0e2f4ffd6c58/gcp/general_dns_cert-manager.tf
# (as well as configuration in netlify) for each of these to enable these to work.
https://acme.cert-manager.io/http01-edit-in-place https://cert-manager.io/docs/reference/annotations#acmecert-manageriohttp01-edit-in-place 301!
https://acme.cert-manager.io/http01-ingress-class https://cert-manager.io/docs/reference/annotations#acmecert-manageriohttp01-ingress-class 301!
https://acme.cert-manager.io/http01-ingress-ingressclassname https://cert-manager.io/docs/reference/annotations#acmecert-manageriohttp01-ingress-ingressclassname 301!
https://acme.cert-manager.io/http01-parentrefkind https://cert-manager.io/docs/reference/annotations#acmecert-manageriohttp01-parentrefkind 301!
https://acme.cert-manager.io/http01-parentrefname https://cert-manager.io/docs/reference/annotations#acmecert-manageriohttp01-parentrefname 301!

https://experimental.cert-manager.io/request-duration https://cert-manager.io/docs/reference/annotations#experimentalcert-manageriorequest-duration 301!
https://experimental.cert-manager.io/request-is-ca https://cert-manager.io/docs/reference/annotations#experimentalcert-manageriorequest-is-ca 301!
https://experimental.cert-manager.io/private-key-secret-name https://cert-manager.io/docs/reference/annotations#experimentalcert-managerioprivate-key-secret-name 301!

https://venafi.cert-manager.io/custom-fields https://cert-manager.io/docs/reference/annotations#venaficert-manageriocustom-fields 301!
https://venafi.cert-manager.io/pickup-id https://cert-manager.io/docs/reference/annotations#venaficert-manageriopickup-id 301!

# Note that kubernetes.io entries will not have real CNAMEs and are merely listed for consistency
# https://kubernetes.io/ingress.class https://cert-manager.io/docs/reference/annotations#kubernetesio/ingressclass 301!
# https://kubernetes.io/tls-acme https://cert-manager.io/docs/reference/annotations#kubernetesio/tls-acme 301!
