Remove contact email hyperlink/url

AI-generated summary

Remove contact email hyperlink/url

Sami_Syed is experiencing an issue where clicking on an email link redirects to an invalid URL. The link is generated from the contact email in the site settings.

To resolve the issue, codinghorror suggests checking the site settings for incorrect values. jomaxro and supermathie recommend verifying the contact url site setting.

merefield provides the solution by setting the contact url to mailto:myname@example.com. However, this results in the “mailto” prefix being displayed.

To remove the “mailto” prefix, merefield suggests using HTML in the contact url field:

<a href="mailto:myname@example.com">myname@example.com</a>

Alternatively, to redirect users to a contact page instead of sending an email, merefield advises using the full URL of the page in the contact url field:
http://myotherwebsite.com
Sami_Syed confirms that this solution works.


on my forum, when people click the email they are redirected to the following link:
https:// forum.theprojectvanlife .com/contact@theprojectvanlife.com

How do I prevent that from happening?

Enter the correct value in site settings, you have something there that is invalid at the moment.

Capture
How is that incorrect?

Can you repro this @jomaxro?

No, I cannot. @Sami_Syed, is it possible the text content was modified? What is the value in /admin/customize/site_texts/js.about.contact_info?

Check your contact url site setting as well.

In order for this to become a hyperlink that launches an email client you need to set contact url to mailto:myname@example.com

In my test on try contact url has higher priority. If both are set the URL appears as expected. If only URL is set, a hyperlink appears. If only email is set the email appears as plain text. @merefield is correct about how to make email a link.

This is what it looks like

In the event of a critical issue or urgent matter affecting this site, please contact us at %{contact_info}.

I already did that and posted a pic of it up top ^

This worked but now I have ‘mailto’ right before the email. Is it possible to remove that.

Actually turns out you can do this in contact url:

<a href="mailto:myname@example.com">myname@example.com</a>

This hides the ugly mailto :slight_smile:

That last rolo is mine, now, right? :wink:

Note that’s contact email, not contact url.

:heart:!

like there is a ‘mailto:’ tag is there something like a ‘redirect’ tag? So that I can send users to my contact page when they click the email

In that case just use the full URL of the page you want to go to, including the http://

(if you don’t it will try to append the link you give to the end of the current domain).

You don’t need the rest of the html in the case of mailto:, so just:

http://myotherwebsite.com should work in contact url

It worked perfectly

This is the problem I was having. Thank you!