This message was deleted.
# getting-started
s
This message was deleted.
b
@rhythmic-tailor-1242 you need to add a listener rule: https://www.pulumi.com/registry/packages/aws/api-docs/alb/listenerrule/
r
Thanks! This is what I have but
www
still doesn't work:
Copy code
const target = alb.createTargetGroup(
    "web-target", {vpc: unikVpc, port: PORT}
);

const httpsListener = target.createListener("web-listener", {
    port: 443,
    certificateArn: certificateValidation.certificateArn
});

httpsListener.addListenerRule("nginx", {
    actions: [{
        type: "redirect",
        redirect: {
            host: "unik.style",
            protocol: "HTTPS",
            port: "443",
            statusCode: "HTTP_301",
        },
    }],
    conditions: [{
        hostHeader: {
            values: ["unik.style", "www.unik.style"],
        },
    }],
})