You got it a little backwards
1) In namecheap, set your nameservers to:
ns1.linode.com
ns2.linode.com
ns3.linode.com
ns4.linode.com
Do this under either "Domain name server setup" or "Transfer DNS to webhost", one of which will appear near the top of the menu.
DO NOT use "nameserver registration".)
2) In Linode DNS Manager, make sure that your NS records are:
ns1.linode.com mydomain.com
ns2.linode.com mydomain.com
ns3.linode.com mydomain.com
ns4.linode.com mydomain.com
(You got this right... because these records are automatically produced.)
3) In the A/AAAA record,
Host name: (blank)
IP Address: your linode's ip address
TTL: default
(
The host name is supposed to be blank unless the record is for a subdomain.)
4) "www.mydomain.com" is actually a subdomain, so you need a second record for it:
Host name: www
IP Address: your linode's ip address
TTL: default
(This is probably already automatically produced.)
This way, both mydomain.com and
www.mydomain.com will point to your linode. Wait a day or two for the namecheap settings to propagate, and then if you still have a problem, that would be internal to your server.