[solved] .well-known/caldav check in 13.0.7 explained

i tried also to add it in the vhost for cloud on proxy server but the issue it’s still there.

i noticed that inside the nextcloud folder in the .httaccess file i have the following lines

RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
  RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]

this suppose to do the job ? but i still have the error

any ideea why this isn’t working ? the error it’s still present.

then want i give you this also to the hand,
i have run my nextcloud as sub behind my domain…
Take a look :



# nextcloud configuration
Alias /nextcloud /srv/nextcloud
<Directory /srv/nextcloud>
    DirectoryIndex index.html index.php
    AllowOverride All
    Options +FollowSymlinks
    Require all granted
    Header always set Strict-Transport-Security "max-age=31556926; includeSubDomains; preload"
    Header always set Referrer-Policy "no-referrer"
    SetEnv HOME /srv/nextcloud
    SetEnv HTTP_HOME /srv/nextcloud
  <IfModule mod_dav.c>
    Dav off
    Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
    Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav

like you see, have i bound in the “Header always set Strict-Transport-Security” also in, as well as “Header always set Referrer-Policy”

in your case should this be

Redirect 301 /.well-known/carddav /remote.php/dav
Redirect 301 /.well-known/caldav /remote.php/dav

because your sub.domain.com is in this case the root so “/” and .well-known/~ is the way to
“/remote.php/dav” so : "cloud.mydomain.com/remote.php/dav "
so must it named ^^

if this works, give feedback…

this could/should be pinned for “Apache-Configuration files”
or build up a Wiki !! :wink:

best regards

so i did the change on the vhost where my nexcloud instalation is (behind the proxy) so my vhost looks like this now :

<VirtualHost *:80>
        ServerName cloud.mydomain.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/cloud.mydomain.com

<Directory /var/www/html/cloud.mydomain.com/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted

<IfModule mod_dav.c>
Dav off

SetEnv HOME /var/www/html/cloud.mydomain.com
SetEnv HTTP_HOME /var/www/html/cloud.mydomain.com
Satisfy Any


        Redirect 301 /.well-known/carddav /remote.php/dav
        Redirect 301 /.well-known/caldav /remote.php/dav

        ErrorLog ${APACHE_LOG_DIR}/cloud.mydomain.com-error.log
        CustomLog ${APACHE_LOG_DIR}/cloud.mydomain.com-access.log combined


but the error it’s still present

There are some warnings regarding your setup.

* Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the [documentation](https://docs.nextcloud.com/server/14/go.php?to=admin-setup-well-known-URL).
* Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the [documentation](https://docs.nextcloud.com/server/14/go.php?to=admin-setup-well-known-URL).

could it be linked to this one here?

i think yes.

I had the same issue and solved it adding the following lines in /etc/apache2/sites-available/nextcloud.conf

    Redirect 301 /.well-known/carddav https://MyServer/nextcloud/remote.php/dav
    Redirect 301 /.well-known/caldav https://MyServer/nextcloud/remote.php/dav

Thank you razcazar, i followed your instructions and everything’s just fine .

Thanks a lot.

1 Like

What do we do for a nginx server?
Do I modify my /etc/nginx/sites-available/nextcloud file?

Solution for Plesk /Apache Nginx.
add in the plesks apache $ nginx settings of your domain under
Additional nginx directives

rewrite ^/.well-known/carddav$ https://yourdomain.tld/remote.php/dav redirect;

rewrite ^/.well-known/caldav$ https://yourdomain.tld/remote.php/dav redirect;
1 Like

I’m a bit confused by that warning, as everything seems to work, but I have to admit, that I’m not using carddav or caldav anyway. This is my setup:

I’m running nextcloud 14.0.3 in a subfolder behind an apache reverse-proxy, thus, on proxy side:
https://cloud.xxxxx.xx ----> 192.168.x.x/nextcloud (no https on the internal host).
This works fine, I get an A+ rating on the security scanner and everything is working.
When I try https://cloud.xxxxx.xx/.well-known/carddav I get redirected to https://cloud.xxxxx.xx/remote.php/dav/ and can see the “Nodes” page from sabre/dav in my browser, so this works too.

I tried:

Redirect 301 /.well-known/carddav https://cloud.xxxxx.xx/remote.php/dav
Redirect 301 /.well-known/caldav https://cloud.xxxxx.xx/remote.php/dav

on both, the proxy and the internal nextcloud server, as well as:

Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav

on the internal nextcloud server.
In every combination I get redirected correctly, but I still get the warning in my settings.

Any idea?

Hoping this helps someone out. After researching and looking for answers. Finally found what I needed to fix and where. After upgrading to 13.0.7 received the same error as several others.

Your web server is not properly set up to resolve “/.well-known/caldav”.
Your web server is not properly set up to resolve “/.well-known/carddav”

Trying to find where to place the redirect was an interesting challenge. I am just learning so it took me awhile. Every install is different. I have a Manual install with Ubuntu 16.04 with LAMP. NextCould is in root and Let’s Encrypt is installed. So figuring out where to put the exception took me awhile. Thanks to this post I finally tried and found the solution that worked for me.
Here it goes.

The redirect had to be placed under sites-available in the 000-default-le-ssl.conf file. Thanks to blackcrack and all the other posts. It has cleared the error, though I think it needs to be a fix.

    <IfModule mod_dav.c>
    Dav off
    Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
    Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav




thank you for you Post. I soved it with you Post.

Many thanks

It seems we have a similar setup, as only your solution worked for me. Thanks!

It took me ages to crack the obvious code. Galder56 has the right answer, and the reason is that the instance of Nextcloud running at Galder56 has a ROOT password of something like /var/www/html and has a folder called nextcloud under the root. And so the caldav path that must be used is:


DO NOT SPELL OUT THE ENTIRE ROOT in your configuration. You must just use a path relative to the root shown in your apache or nginx configuration.

I spent ages trying to figure out why me entry:

Redirect 301 /.well-known/carddav /var/www/html/nextcloud/remote.php/dav

…just didn’t work. Well I finally got the penny to drop, and THIS worked for me:

Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav

Happy Nextcloud’ing y’all.

This guide is not very detailed. And your comment is not understandable for the beginners.
Could you, please, explain:
what directory part you are talking about?
where it is specified, which path/file?
where is this .htaccess file located?
how you made apache use this .htaccess file?


I installed v15 of nextcloud and had the same issue. I constantly got this “your webserver is not configured properly to resolve…” thing. Actually galder56’s explanation brought me to the right conclusion to solve it for my system. Before I describe it: I use Debian 9, Apache, MariaDB SQL and PHP7.2. The description will probably only work for non ssl connections. I am still working on the SSL part of my server.

  1. go to the folder /etc/apache/sites-availalbe
  2. edit the file 000-default.conf
  3. Underneath “/</VirtualHost/>” enter the lines
    Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
    Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
  4. save and restart apache.
  5. go back into nextclouds admin section and check out your Overview. the lines above in galder56’s post should have disappeared.

That is how it worked for me.
Good luck.


Your solution worked for me, thanks man!

I am glad I could help. :slight_smile: