How can I create a page with the url "https://mywebsite.com/.well-known/apple-developer-merchantid-domain-association" on Webflow if it automatically removes the "." and "/" in ".well-known/"?

Published on
September 22, 2023

To create a page with the URL "https://mywebsite.com/.well-known/apple-developer-merchantid-domain-association" on Webflow, you can use a workaround to include a custom URL slug for your page. By default, Webflow automatically removes the "." and "/" characters in URLs, but this can be bypassed using a combination of custom code and URL redirects. Here's how you can achieve it:

  1. Create a blank page:
  • In your Webflow project, navigate to the Pages panel.
  • Click on the "+" icon to add a new page.
  • Select the "Blank" option to create an empty page.
  1. Set the custom URL slug:
  • Open the Page Settings panel for the newly created blank page.
  • In the "Page URL" field, enter a custom slug without the "." or "/" characters. For example, you can use "well-known-apple-developer-merchantid-domain-association".
  1. Add custom code to redirect the URL:
  • In the Project Settings panel, go to the Custom Code tab.

  • In the <head> section of the code, add the following code:

    \`\`\`html<script type="text/javascript">  window.location.href = "https://mywebsite.com/.well-known/apple-developer-merchantid-domain-association";</script>\`\`\`
  1. Save and publish your changes:
  • Make sure to save and publish your project for the changes to take effect.

With this setup, when a user visits "https://mywebsite.com/well-known-apple-developer-merchantid-domain-association", the custom code will automatically redirect them to the desired URL "https://mywebsite.com/.well-known/apple-developer-merchantid-domain-association".

Please note that this solution involves redirecting the URL and doesn't directly create a page with the specific URL. It's essential to keep the code snippet in place to ensure the redirection works correctly.

Additional steps for proper SEO optimization:

  • Update internal links: To ensure proper internal linking, update any reference to the specific URL with the custom slug (e.g., /well-known-apple-developer-merchantid-domain-association).
  • Update sitemap and submit to search engines: Make sure to update your XML sitemap with the new URL and submit it to search engines through their respective webmaster tools. This helps search engines discover and index the page correctly.

Additional Questions for SEO:

  1. How can I optimize my Webflow website for search engines?
  2. What are the key SEO factors to consider when building a Webflow website?
  3. How can I improve the loading speed of my Webflow website for better SEO performance?