[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

[Part 1] How to configure URL redirection with GCP's global external HTTP(S) load balancer (traditional)


*Francken (Honmachi)

Hello!
My name is Hide, the ramen king of Beyond Osaka Office.
This is my 8th post.

Last time, I wrote about how to install a free SSL certificate with GCP's Google Cloud Load Balancing (GCLB)!
In my blog post, I wrote an interesting article about installing a free SSL certificate that you may not know about, so if you are interested, please take a look!

How to install a free SSL certificate on GCP load balancer (GCLB)

How to install a free SSL certificate on GCP load balancer (GCLB)

About Google Cloud Load Balancing (GCLB) URL redirects

URL redirection means that when you access one URL, you are automatically redirected to another URL, just like when you access example.com, you are automatically redirected to example2.com. Most can be configured with Apache, Nginx, etc. on the web server.

In that case, the access goes directly to the web server, which may increase the load on the server, but if there is a load balancer (LB) in front of the server, URL redirect settings can be done with the LB alone. You can reduce the load on Apache, Nginx, etc. on your web server.

URL redirect settings are also possible with Google Cloud Load Balancing (GCLB), but the URL redirect settings are different for "Global HTTP(S) Load Balancer" and "Global External HTTP(S) Load Balancer (Conventional)". it's different. The traditional type is easier to set up than the global HTTP(S) load balancer.

It is very difficult to set up by just looking at the documentation, but if you look at this blog, you can easily set up URL redirection, so let's set it up together!

Setting procedure

*This assumes that a load balancer (LB) has been created.

① Load balancing > LB name > Click Edit

 

② Select detailed host and path rules and click [Add host and path rules]

 

③ Specify the redirect source domain with new host and path rules

 

④Click [Add path rule]

 

⑤ Configure redirect settings

● Path: Specify the path to be redirected
● Action: Redirect the client to another host/path
● Redirect host: Specify the redirect destination
● Redirect path: Please select the appropriate one
● Redirect response code 301
● HTTPS redirect: Please select the appropriate one
● Delete query: Please select the appropriate one

*Reference material: URL redirect setting official document

 

⑥ Operation confirmation

*Please do this after the LB update is complete
*Please check if you are redirected

 

 

summary

What do you think?

Traditional global HTTP(S) load balancers are easy to set up redirects, so I think I was able to set up redirects with GCLB right away.

However, if you can properly set up redirects with a load balancer, you can do it without putting any load on the server, so we recommend it!

If you want to set up a redirect with GCP's LB, please use this as a reference!

If you found this article helpful , please give it a like!
2
Loading...
2 votes, average: 1.00 / 12
1,966
X facebook Hatena Bookmark pocket
[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

The person who wrote this article

About the author

Hide@Infrastructure Engineer

It all started with a very interesting interview.
A mid-career employee of the System Solutions Department in Osaka.My
job is to build and operate servers and clouds!
I have the qualifications of LPIC1, AWS SAA, and OCI Architect Associate.

Actually, I love ramen and
have investigated over 100 stores in Osaka (。-∀-) I'm striving to become the Ramen King of Nibi Beyond
!

I'm also on Twitter, so please follow me (´∇`)
Click on the Twitter mark on the right corner! !