Canonical Header on CDN


#21

Automatically sometime doesn’t work. I have faced that problem. You did right thing by keeping snippet saved.


#22

Yes, I just checked after removing the code, all the images are still showing cdn path. Thanks!

PS: Sorry, these are reverted again to www version, so for me cdn path doesn’t include without the code.


#23

apparently, because it has been rewritten on the sitemap.


#24

@gulshankumar How CDN path automatically reflecting for you without the CDN filter code?


#25

I thought to dig deeper, and find out why sometime CDN path gets included in the XML sitemap even without using any snippet, while sometime it don’t get included automatically.

I found there is an extension which I am using, known as Yoast SEO from W3TC plugin which does this job.


However, simply enabling this was not solution for seeing updated version sitemap. I had to disable/enable XML sitemap in the Yoast plugin to see the reflected changes.

Doubt cleared. It means, we need to use snippet if we are not using W3TC cache plugin extention.


#26

Thanks. It means, I’ll need to use the CDN filter because I’m not using W3TC. Yoast also recommends use CDN filter to fix the issue.


#28

can you tell me how to update CDN path for images in the Sitemap, on yoast pliugin?


#29

Which CDN are you using? Please don’t mind. I am asking because sometime process may vary.


#30

BunnyCDN after reading review.


#31

now please tell me now update CDN path for images in the Sitemap.


#32

Please check this code. You need to add in the theme functions.php file.


#33

can you tell me specific location of funcation.php file top or button. I am using newspaper theme currently


#34

In the last line where code end, then you should write.


#35

am i right there

please comfirm me.


#36

Correct.

Note: Please replace example.com with your domain and same for the CDN path.


#37

Thanks


#38

You’re welcome!

Please use :heart: button to express gratitude or show support. No need to write ‘Thanks’ :slight_smile:


#39

:kissing_heart: