Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Untuk mencegah pihak yang tidak diberi otorisasi menggunakan kunci API Anda untuk membuat Dynamic Links yang
mengalihkan pengguna dari domain Anda ke situs yang tidak Anda miliki, Anda harus menentukan URL
yang dapat dialihkan oleh Dynamic Links.
Untuk menentukan URL yang diizinkan, klik
more_vert> Allowlist URL pattern
dari halaman Dynamic Links di Firebase console, lalu tentukan hingga
10 ekspresi reguler menggunakan
sintaksis RE2. Hanya URL
yang cocok dengan salah satu ekspresi reguler ini yang berhasil digunakan sebagai deep
link (link) atau link penggantian (afl, ifl, ipfl, ofl) untuk Dynamic Links. Jika Anda menentukan pola URL, URL apa pun yang tidak cocok dengan salah satu pola akan menyebabkan Dynamic Links menampilkan error HTTP 400.
Anda harus membuat pola URL seketat mungkin. Contoh:
Terlalu permisif
Lebih baik
^https://.*.com/.*$
Dapat mengalihkan ke halaman mana pun di situs apa pun yang diakhiri dengan .com.
^https://mybrand\.com/.*$
Hanya dapat mengalihkan ke halaman di mybrand.com.
^https://play.google.com/.*$
Dapat mengalihkan ke halaman Google Play Store aplikasi mana pun.
^https://play\.google\.com/.*id=myapp\.com$
Hanya dapat mengalihkan ke halaman Google Play Store untuk aplikasi dengan
nama paket myapp.com.
^https://itunes.apple.com/.*$
Dapat mengalihkan ke halaman mana pun di itunes.apple.com.
^https://itunes\.apple\.com/.*id123$
Hanya dapat mengalihkan ke halaman App Store untuk aplikasi dengan ID
id123.
Anda dapat memastikan deep link dan link penggantian untuk Dynamic Links cocok dengan salah satu
pola URL dengan melihat halaman debug untuk Dynamic Links dan memverifikasi bahwa tidak ada
peringatan:
[null,null,["Terakhir diperbarui pada 2025-08-18 UTC."],[],[],null,["\u003cbr /\u003e\n\n| **Deprecated:** Firebase Dynamic Links is *deprecated* and should not be adopted in projects that don't already use it. The service will shut down on August 25, 2025. See the [Dynamic Links Deprecation FAQ](/support/dynamic-links-faq) for more information.\n\nTo prevent unauthorized parties from using your API key to create Dynamic Links that\nredirect from your domain to sites you don't own, you should specify the URLs\nyour Dynamic Links can redirect to.\n\nTo specify the allowed URLs, click\nmore_vert **\\\u003e Allowlist URL pattern**\nfrom the Dynamic Links page of the Firebase console, and then specify up to\n10 regular expressions using\n[RE2 syntax](https://github.com/google/re2/wiki/Syntax). Only URLs\nthat match one of these regular expressions can be successfully used as a deep\nlink (`link`) or fallback link (`afl`, `ifl`, `ipfl`, `ofl`) for a Dynamic Links. If\nyou specify URL patterns, any URL that doesn't match one of the patterns will\ncause your Dynamic Links to return HTTP error 400.\n\nYou should make your URL patterns as restrictive as possible. For example:\n\n| Too permissive | Better |\n|----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| `^https://.*.com/.*$` Can redirect to any page on any site ending with `.com`. | `^https://mybrand\\.com/.*$` Can redirect only to pages at `mybrand.com`. |\n| `^https://play.google.com/.*$` Can redirect to any app's Google Play Store page. | `^https://play\\.google\\.com/.*id=myapp\\.com$` Can redirect only to Google Play Store pages for the app with the package name `myapp.com`. |\n| `^https://itunes.apple.com/.*$` Can redirect to any page on `itunes.apple.com`. | `^https://itunes\\.apple\\.com/.*id123$` Can redirect only to the App Store page for the app with the ID `id123`. |\n\nYou can make sure a deep link and fallback links for a Dynamic Links match one of\nyour URL patterns by viewing the debug page for Dynamic Links and verifying there are\nno warnings: \n\n```\nhttps://example.page.link/WXYZ?d=1\n```"]]