How to Match Only `/` in CloudFront Using `/?*`

📰 Dev.to · upa_rupa

Learn to match only the root URL in CloudFront using a specific pattern

intermediate Published 21 Apr 2026
Action Steps
  1. Configure a CloudFront distribution
  2. Set the root object to match only '/' using '/?*'
  3. Test the configuration to ensure correct routing
  4. Verify that only the root URL is matched
  5. Apply this pattern to other distributions as needed
Who Needs to Know This

DevOps and cloud engineers can benefit from this lesson to configure CloudFront distributions correctly

Key Insight

💡 Use '/?*' to match only the root URL in CloudFront

Share This
Match only the root URL in #CloudFront using '/?*'
Read full article → ← Back to Reads