Showing posts with label SSL. Show all posts
Showing posts with label SSL. Show all posts

How to configure a secured custom domain on a Azure Function or website

I wanted to create this tutorial for a long time. How to map a naked domain on an Azure resource. It looks so complicated, but once you know what to do it's kind of simple in fact. In this post, I will share the three simple steps to do exactly this.

Step 1: Add Custom Domain


The first step is to map a domain on the application. The method I will explain uses a "www" domain (ex: www.fboucher.dev). To map directly a naked domain (ex: fboucher.dev) you would need to buy a wildcard certificate. However, I will show you in step three how to walk around this issue by using DNS rules.

From the Azure portal, open the Azure Function or App Service. From the left menu search for "custom", click the Custom domains option. In this panel click the button Add custom domain, and enter your www domain.



Click the validate button and follow the instruction to make the connection between the App Service and your domain provider.

Step 2: Adding a Certificate


Now that your custom domain is mapped, let's fix the "not secure" warning by adding a certificate. From the Azure portal return in the App blade. Repeat the previous search for "custom", and select the option TLS/SSL settings. Click the Private Key Certificates, and the Create App Service Managed Certificate button. Select the domain previously added and saved. It will take a few moments to create the certificate.



Go back in the Custom domains blade and click the Add binding button. Select the domain and certificate, don't forget to select the SNI SSL option and click the Add Binding button.




Step 3: Create the DNS Rules

Create an account in cloudflare.com and add a site for your domain. We will need to customize the DNS and create some Page Rules.



On the cloudflare.com note the 2 nameservers addresses. Go to the origin name provider (in my case godaddy) and replace the names of the nameservers with the value found on cloudflare.



Create a rule that will redirect all the incoming traffic from the naked-domain to www.domain. On the option on the top, click the Pages Rules (B). Then Click the Button Create Page Rule



In the field for If the URL matches: enter the naked-domain follow by /*. That will match everything coming from that URL

For the settings select Forwarding URL and 301- Permanent Redirect. Then the destination URL should be https://www. with your domain and /$1.




References

🔗 Map an existing custom DNS name to Azure App Service: https://c5m.ca/customDomain 

🔗 Secure a custom DNS name with a TLS/SSL binding in Azure App Service: https://c5m.ca/tls-ssl

Reading Notes #426

Every Monday, I share my "reading notes". Those are a curated list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting.

It's a mix of the actuality and what I consumed. You think you may have interesting content, share it!


Cloud

Programming


Podcasts

  • 5 Reasons It's Better to Be A Small Streamer - Twitch Tips (Stream Coach: Twitch Stream Tips | Partner Interviews | Pro Advice) - A nice episode that list some advantages of being a smaller streamer. I've been streaming for one year now, I'm pretty happy with my journey, learned a lot, and still learn so much. I don't feel disadvantaged, but that's maybe just because I don't really focus on growth.
  • 469: See What Really Matters, with Greg McKeown (Coaching for Leaders) - Nice episode that talks about the essential, how to find it, how to not pass over it. Very interesting. The book, Essentialism, from seems interesting too... And hop! On the to-read list.

Miscellaneous

~


Reading Notes #419


Every Monday, I share my "reading notes". Those are the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting.
It's a mix of the actuality and what I consumed. Enjoy!


Suggestion of the week

  • Approval Workflows With GitHub Actions (Aaron Powell) - Wow! That's a very clever and impressive way to have step flow in GitHub. All the details are in the post if you would like to create your own.

Cloud

Programming

Podcasts

Miscellaneous


Reading Notes #168

poteauSuggestion of the week


Cloud


Programming


Miscellaneous


See you in 2015!


~Frank B


Reading Notes #164

happy-movember-magnet

Suggestion of the week


Cloud


Programming

 

Miscellaneous

~Frank B

Reading Notes #137

Suggestion of the week


Cloud


Programming


Mobile


Miscellaneous



~Frank


Reading Notes #132

TypeScript_CoverSuggestion of the week

  • TypeScript for C# Programmers (Steve Fenton) - Great book that in less than hundred pages, explains to me how to code in TypeScript. I feel so comfortable already I will add TypeScript in my next web project, and I will strongly recommend this book to everyone. If you are a C# developer, know your base in JavaScript this book is available in PDF for free!

Cloud


Programming


Miscellaneous



Reading Notes #89

Photo edited with http://www.tuxpi.com

Suggestion of the week


Cloud

 

Programming

 

Integration

I wrote a blog post a few years ago around the options for where you could put configuration settings in BizTalk (Click here).

System Management


Miscellaneous


~Frank



Reading Notes #37


Cloud


Programming


Miscellaneous


Frank


Reading Notes #35


image

Cloud


Programming

  • Structurez votre code Ruby (Bruno Michel) - This nice post introduce the unused Struct. A simple but power class in Ruby.
  • Soyez unique, utilisez des Sets (Bruno Michel) - Wow I didn't know the Set class in Ruby. I got to edit one of my script immediately.
  • Asp.Net MVC 4 beta - Nice post that quickly present some of the main new features in the brand new ASP.Net MVC 4. Also video and slide reference.
    Spending limits are a new feature we added to Windows Azure last month, and ensure that you never have to worry about accidentally going over the resources included in a free offer and being charged.
    You can learn more about the spending limit feature here.
    The ASP.NET MVC 4 Beta release works with VS 2010 and .NET 4.0, and is side-by-side compatible with prior releases of ASP.NET MVC
    Bundling and Minification
    Database Migrations – ASP.NET MVC 4 includes the new Entity Framework 4.3 release,
    Web API
    new support for building mobile web applications and mobile web sites,
    Razor Enhancements – ASP.NET MVC 4 includes V2 of our Razor View engine.
    Async Support and WebSockets
    • Fun with Ruby Block Parameters - Nice post going dipper in Ruby's Blocks capabilities...

    Miscellaneous


    ~ Frank


    Reading Notes #30



    Cloud


    Programming

    Miscellaneous

    “[…] A popular saying goes that Programmers are machines that turn caffeine into code. […]”
    • Lowering Higher Education - In this post David S Platt share is idea of what could be the future of Education.... And I like this!
    • “[…] Stanford University announced that its class on artificial intelligence will be available for free online […]”
    • Agile Results for Time Management - This post present a summary of the method call Agile Result. A good way to improve your time management.
    • 500! (Richard Ziade) - If you don't know Readability take few second you should be charmed.
    • Missing Key to Unification (safeerm) - According to this post 2012 will by important in the unification processes.


    ~Franky