By using AWS re:Post, you agree to the Terms of Use
/Unable to have # character in Path for RedirectConfig/

Unable to have # character in Path for RedirectConfig


When attempting to add a redirect to my ALB listener rule, having a # character in the Path attribute causes it to view the path as invalid.

This is true both on the console and cloudformation. Is this a bug or intended functionality?

1 Answers

Unfortunately, this is the same behavior when using the console. If you try from there, it returns Invalid path message and doesn't let you save the rule.

Traditionally, 3xx redirects don't allow this generally, since the anchor is only processed on the client side. More recently, that spec has been updated, however ALB still doesn't support it properly.

That said, I was experimenting with this a bit, and I found that it seems to work if you put this into the query attribute. It does add a ? character as well, but the anchor seems to work. For example:

  • Host:
  • Path: /wiki/Foobar
  • Query: #See_also

This rule causes a redirect to, which does seem to behave as an anchor link should, though the ? should generally be unneeded for this.

answered 24 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions