Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Utiliser un domaine personnalisé avec API Gateway
Vous pouvez implémenter un domaine personnalisé pour votre passerelle en configurant l'équilibrage de charge HTTP(S) pour API GatewayBÊTA. Une fois l'équilibreur de charge HTTP(S) de votre passerelle configuré, suivez les étapes ci-dessous pour mettre à jour les enregistrements DNS de votre domaine personnalisé afin qu'ils pointent vers le nouvel équilibreur de charge.
Ces étapes sont également obligatoires lorsque vous utilisez un équilibreur de charge HTTP(S) avec un certificat géré par Google (qui requiert un domaine). Il est recommandé d'allouer et d'utiliser une adresse IP statique avec DNS. Les instructions spécifiques pour cette étape dépendent de votre fournisseur DNS.
Pour envoyer du trafic vers l'équilibreur de charge, l'enregistrement DNS de votre domaine personnalisé (par exemple, my-app-domain) doit pointer vers la ou les adresses IP de l'équilibreur de charge.
Pour trouver l'adresse IP de votre règle de transfert globale, utilisez la commande suivante :
gcloud compute forwarding-rules list
Mettez à jour l'enregistrement DNS A ou AAAA de votre domaine pour qu'il pointe vers l'adresse IP de l'équilibreur de charge afin que le trafic envoyé vers l'URL de domaine personnalisé existante soit acheminé via l'équilibreur de charge. La propagation de cette modification au serveur DNS peut prendre de quelques secondes à plusieurs heures.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/03 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/03 (UTC)."],[[["\u003cp\u003eConfiguring a custom domain for API Gateway involves setting up HTTP(S) Load Balancing for API Gateway.\u003c/p\u003e\n"],["\u003cp\u003eUpdating your custom domain's DNS records to point to the load balancer service is required after setting up the HTTP(S) load balancer.\u003c/p\u003e\n"],["\u003cp\u003eTo direct traffic to the load balancer, the DNS record of the custom domain must point to the load balancer's IP address(es).\u003c/p\u003e\n"],["\u003cp\u003eUpdating the domain's DNS A or AAAA record to the load balancer's IP address routes traffic through the load balancer, with DNS propagation taking varying amounts of time.\u003c/p\u003e\n"],["\u003cp\u003eUtilizing a static IP address with DNS when using an HTTP(S) Load Balancer is recommended.\u003c/p\u003e\n"]]],[],null,["# Use a custom domain with API Gateway\n====================================\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nA custom domain for your gateway can be implemented by configuring [HTTP(S) Load Balancing for API Gateway^PREVIEW^](/api-gateway/docs/gateway-load-balancing). Once the HTTP(S) load balancer for your gateway is set up, follow the steps below to update your custom domain's DNS records to point to the new load balancer service.\n\nThese steps are also required when using an HTTP(S) load balancer with a Google-managed certificate (which requires a domain). Allocating and using [a static IP address](https://cloud.google.com/sdk/gcloud/reference/compute/addresses/create) is recommended when used with DNS. The specific instructions for this step depend on your DNS provider.\n\nFor more information on setting up an HTTP(S) Load Balancer for API Gateway, see [Get started with HTTP(S) Load Balancing for API Gateway^PREVIEW^](/api-gateway/docs/gateway-serverless-neg)\n\n1. To send traffic to the load balancer, the DNS record of your custom domain (for example, `my-app-domain`) must point to the IP address(es) of the load balancer.\n\n To find the IP address of your global forwarding rule, use this command: \n\n ```\n gcloud compute forwarding-rules list\n ```\n2. Update your domain's DNS A or AAAA record to point\n to the load balancer's IP address so that traffic sent to the existing custom domain URL is routed through the load balancer instead. It may take as little as several seconds or as long as several hours for DNS to propagate this change to the DNS server."]]