Automatically add #Sedo verification to a batch of domain names using #NameCheap #API

If you are listing domains on Sedo, it’s likely that you have a number of domains, and perhaps instead of going through the process of manually adding the CNAME record to every domain, you can use NameCheap’s API in C# to automatically add CNAME records.

This is a follow-on to the previous blog post, shown below; Classes mentioned in this post will not be repeated, so you should follow this first;

Given a list of domains in a text file (one domain per line), add this to the project with the build action “copy always”.

var domains = File.ReadAllLines(“domainList.txt”);
foreach (var domain in domains)
var domainTld = Regex.Match(domain, @”.w+$”).Value;
var domainWithoutTld = domain.Replace(domainTld, “”);
domainTld = domainTld.Substring(1);
var hosts = GetHostsFromDomain(domainWithoutTld, domainTld);
hosts.Add(new HostRecord { Name = “***ID***”, Type = “CNAME”, Value = “” });
SetHostRecords(domainWithoutTld, domainTld, hosts);

Where evidently ***ID*** is replaced with your own personal ID from Sedo. The one second delays are to help prevent throttling, which the NameCheap API uses to prevent abuse.

And, if you’re interested, this is the list of domains that is going on sale;

Leave a Reply

Your email address will not be published. Required fields are marked *