---
slug: "aws-eks-ingress-no-www-url-redirect-to-www"
title: "Manifest to Redirect Non-www Requests to www When Using ALB with AWS EKS Ingress"
description: "This is an Ingress manifest that responds to requests without \"www\" by redirecting them to a URL with \"www\"."
url: "https://www.ytyng.com/en/blog/aws-eks-ingress-no-www-url-redirect-to-www"
publish_date: "2024-05-20T11:20:05Z"
created: "2024-05-20T11:20:05Z"
updated: "2026-02-25T00:33:48.338Z"
categories: []
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20250611/d4271447b0e940f5bb10946e7d7ef2f9.png.webp?width=768"
has_video: true
has_music: true
video_urls: ["https://media.ytyng.net/ytyng-blog/306/featured-video-1.mp4", "https://media.ytyng.net/ytyng-blog/306/featured-video-2.mp4", "https://media.ytyng.net/ytyng-blog/306/featured-video-3.mp4"]
music_urls: ["https://media.ytyng.net/ytyng-blog/306/featured-music-306-5.mp3", "https://media.ytyng.net/ytyng-blog/306/featured-music-306-7.mp3"]
lang: "en"
---

# Manifest to Redirect Non-www Requests to www When Using ALB with AWS EKS Ingress

Here is the translation of the provided Japanese blog post content into English:

---

This is an Ingress manifest that responds to a request without "www" by redirecting to a URL with "www".

```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: no-www-ytyng-com-ingress
  namespace: ytyng
  labels:
    app: my-k8s-alb
  annotations:
    alb.ingress.kubernetes.io/actions.redirect-to-eks: >
      {"type": "redirect", "redirectConfig": {"host": "www.ytyng.com", "path": "/", "protocol": "HTTPS", "port":"443", "query": "", "statusCode": "HTTP_301"}}
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
    alb.ingress.kubernetes.io/group.name: my-k8s-alb
    alb.ingress.kubernetes.io/group.order: "5"
    alb.ingress.kubernetes.io/load-balancer-name: my-k8s-alb

spec:
  ingressClassName: alb
  rules:
    - host: ytyng.com
      http:
        paths:
          - pathType: ImplementationSpecific
            backend:
              service:
                name: redirect-to-eks
                port:
                  name: use-annotation
```

After applying the manifest, check the ALB listener rules and look at the EKS cluster → Resources → Resource Type → Services and Networking → Ingress → the name of this manifest, and check the event logs.
