Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21768_NOFOLLOW_links_in_public_online_view_of_mailings #12561

Merged
merged 1 commit into from
Jul 25, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Replaces #11673 with test fix

This patch makes sure the trackable url links in the public view of mailings get the nofollow tag so Google will not index urls with a syntax like: https://abc.xyz/sites/all/modules/civicrm/extern/url.php?u=1234&qid=4321

Before

Currently Google (and possibly other search engines) index the trackable urls, so url's like:
https://abc.xyz/sites/all/modules/civicrm/extern/url.php?u=1234&qid=4321
end up in the search index.
screenshot from 2018-02-15 12-06-33

After

Trackable urls get the tag rel='NOFOLLOW', which means Google will not follow the links, which could only happen in a situation of a public viewable mailing anyway. The mailing itself is still able to get indexed. Note: this does not 100% prevent Google from indexing, others means like robots.txt are more robust for that. But this patch at least prevents the strange indexed urls for default configurations.

Technical Details

adding rel='NOFOLLOW' to trackable urls to TrackableURL.php does the trick so far.

Comments

(Another option would have been to insert a metatag in the head of CRM/Mailing/Page/View.php)

@civibot
Copy link

civibot bot commented Jul 25, 2018

(Standard links)

@eileenmcnaughton
Copy link
Contributor Author

Adding merge on pass per original PR

@colemanw colemanw merged commit 29f6f8f into civicrm:master Jul 25, 2018
@colemanw colemanw deleted the mailing branch July 25, 2018 12:38
totten added a commit to totten/org.civicrm.flexmailer that referenced this pull request Sep 11, 2018
…m-core@v5.5

This is a follow-up to civicrm/civicrm-core#12561, which added
the `rel="nofollow"` tag on all tracked URLs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants