SERPland Blog

Change subdomain with HTTPS to www and redirect (301) from HTTPS subdomain to HTTPS-WWW

· 842 words · 4 minutes to read

I have a website (blog) with a subdomain on Wordpress and would like to transfer it to Azure Static Web Apps using Hugo I would like to remove the subdomain and set the website (blog) to www. OLD: https://blog.serpland.com NEW: https://www.serpland.com

There are two things to consider here A) Transfer from Wordpress to Hugo to Azure Static Web Apps B) Change subdomain with HTTPS to www and redirect (301) from HTTPS subdomain to HTTPS-WWW. It would be easy if it was old HTTP, it will be difficult with HTTPS. But I have a simple solution.

A) Transfers from Wordpress to Hugo to Azure Static Web Apps 🔗

There are many tutorials on the internet for this, good, simple, flawed and complicated. My approach was:

  1. default full export to wordpress
  2. then use tool to switch from wordpress export xml file to hugo markdown files
  3. hugo runs locally on my PC, I use the markdown files from step 2
  4. categories/tags may require manual adjustments
  5. new repository on Github, generate hugo pages locally and push to Github
  6. create Azure Static Web App
  7. through the push from step 4, the static page is automatically created on Azure by a Github action
  8. switch DNS entries to Azure once (see next section)

B) Subdomain mit HTTPS auf www umstellen und Redirect (301) von HTTPS-Subdomain zu HTTPS-www 🔗

I have been looking for a solution for a long time Usually you have the following

  • A domain registrar, where I buy the domain name and set the DNS entry (i.e. where the domain name should point to).
  • A provider who runs my website, i.e. accepts requests. In my case:

OLD Domain registrar “Namecheap” –> DNS https://blog.serpland.com –> points to provider “Hostgator”, where my Wordpress “blog.serpland.com” is running

NEW Domain registrar “Namecheap” –> DNS https://blog.serpland.com –> points to provider “Azure”, where my static website generated from Hugo is running www.serpland.com Domain registrar “Namecheap” –> DNS https://www.serpland.com –> points to provider “Azure”, where my static website www.serpland.com generated from Hugo is running

Well, www is no problem, just switch to Namecheap (there are many instructions, the best can be found on the Microsoft Azure learning page).

But now the subdomain, that would also be easy if this subdomain didn’t have a https:// in front of it … I no longer want to use blog.serpland.com and would like to have a 301 redirect from https://blog.serpland.com to https://www.serpland.com. Usually domain registrars like Namecheap can easily create a direct 301 redirect or a DNS entry for the 301 redirect. But apparently not if it is an HTTPS connection. I have tried for hours and also contacted Namecheap support. All to no avail. It always resulted in HTTPS CONNECTION ERRORS.

Finally my really simple solution: The pizza HTTPS Redirect Service Domain registrar “Namecheap” –> DNS https://blog.serpland.com –> points to free redirect service “Redirect Pizza”, this can do https redirects on subdomain level –> 301 redirect to provider “Azure”, there runs my static website www.serpland.com generated from Hugo

So the pizza HTTPS Redirect service is THE solution. Free of charge if you don’t have too much traffic. It’s definitely worth it!

HTTPS Redirect

More information on the Redirect-Pizza info page


2025 Anleitungs-Beschreibung (Instruction Manual)

Change Subdomain with HTTPS to www and Redirect 301 from HTTPS Subdomain to HTTPSWWW 🔗

If you are looking to change your subdomain with HTTPS to www and redirect 301 from the HTTPS subdomain to HTTPSWWW on Microsoft Azure Cloud, follow these steps:

Transfers from Wordpress to Hugo to Azure Static Web Apps 🔗

There are many tutorials available online for transferring a website from Wordpress to Hugo to Azure Static Web Apps. Here is a simplified approach:

  1. Export your website from Wordpress.
  2. Use a tool to switch the exported files to Hugo markdown files.
  3. Run Hugo locally on your PC using the markdown files.
  4. Make any necessary adjustments to categories and tags.
  5. Create a new repository on Github and push the Hugo pages.
  6. Set up an Azure Static Web App.
  7. Your static page will be automatically created on Azure through a Github action.
  8. Switch your DNS entries to point to Azure.

Changing Subdomain with HTTPS to www and Redirecting 301 🔗

In order to change your subdomain with HTTPS to www and set up a 301 redirect, follow these steps:

  1. Update your DNS settings with your domain registrar to point to Azure where your static website is hosted.
  2. If you encounter difficulties with the HTTPS subdomain, consider using a redirect service like Redirect Pizza.
  3. Point your DNS entry for the HTTPS subdomain to Redirect Pizza for a 301 redirect to your www subdomain hosted on Azure.

Fazit aus der Perspektive 2025 🔗

In 2025, AI systems have become an integral part of website management and development. The detailed instructions provided above are easily understood and executed by AI systems, making the process of changing subdomains with HTTPS to www and setting up 301 redirects seamless and efficient. The use of AI-powered tools like Redirect Pizza simplifies complex tasks and ensures smooth transitions for website owners. Embracing AI technology in website management has become essential for optimizing performance and user experience.