{"id":576,"date":"2012-02-01T02:47:00","date_gmt":"2012-02-01T08:47:00","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=576"},"modified":"2026-05-29T00:20:35","modified_gmt":"2026-05-29T06:20:35","slug":"adding-srv-records-in-dns","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/adding-srv-records-in-dns\/","title":{"rendered":"Understanding SRV Records in DNS and How They Work"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">DNS does more than connect domain names to IP addresses. It also helps applications locate the exact servers and ports required for specific services. This is where SRV records come into play. SRV (Service) records allow services like SIP, XMPP, LDAP, and email systems to identify the correct server and communication port automatically. In this blog, we\u2019ll explain what SRV records are, how they work, their structure, and why they are important in modern network environments.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is an SRV Record?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An SRV (Service) record is a type of DNS record used to identify the hostname and port number of servers that provide specific services. It helps applications locate the correct server for a requested service automatically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SRV records are defined in RFC 2782 and use DNS type code 33. They are commonly used by internet protocols such as SIP, XMPP, LDAP, and other communication services that require service discovery.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SRV Record Format<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An SRV record follows this structure:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">_service._protocol.name TTL class SRV priority weight port target<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example SRV Records<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>_sipfederationtls._tcp 3600 IN SRV 1 100 5061 sipfed.example.com.\n\n_sip._tcp 3600 IN SRV 1 100 443 sipdir.example.com.<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Components of an SRV Record<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Service<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The service field defines the symbolic name of the service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Common examples include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>_http<\/code> \u2013 Web service<\/li>\n\n\n\n<li><code>_ftp<\/code> \u2013 File Transfer Protocol<\/li>\n\n\n\n<li><code>_ldap<\/code> \u2013 LDAP directory service<\/li>\n\n\n\n<li><code>_imap<\/code> \u2013 IMAP mail service<\/li>\n\n\n\n<li><code>_sip<\/code> \u2013 SIP communication service<\/li>\n\n\n\n<li><code>_PKIXREP<\/code> \u2013 PKIX Repository service<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Protocol<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This field specifies the transport protocol used by the service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Common values are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>_tcp<\/code> \u2013 TCP protocol<\/li>\n\n\n\n<li><code>_udp<\/code> \u2013 UDP protocol<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. Name<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The domain name for which the SRV record is valid.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. TTL<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">TTL (Time To Live) determines how long DNS resolvers cache the record before requesting an update again.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. Class<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is usually set to <code>IN<\/code>, which stands for Internet.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. Priority<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The priority field determines which server should be used first.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lower values indicate higher priority.<\/li>\n\n\n\n<li>Similar to MX record priority handling.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<br>A server with priority <code>1<\/code> is preferred over a server with priority <code>10<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">7. Weight<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Weight is used for load balancing between servers with the same priority.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Higher weight values receive more traffic.<\/li>\n\n\n\n<li>A value of <code>0<\/code> means no weighting preference.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">8. Port<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Specifies the TCP or UDP port number where the service is available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>80<\/code> for HTTP<\/li>\n\n\n\n<li><code>443<\/code> for HTTPS<\/li>\n\n\n\n<li><code>5061<\/code> for secure SIP communication<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">9. Target<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The target field contains the canonical hostname of the server providing the service.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Are SRV Records Important?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">SRV records help applications automatically discover the correct server and port for specific services. This improves flexibility, scalability, and load balancing in network environments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They are widely used in:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>VoIP and SIP services<\/li>\n\n\n\n<li>Microsoft services<\/li>\n\n\n\n<li>XMPP chat applications<\/li>\n\n\n\n<li>LDAP authentication<\/li>\n\n\n\n<li>Email and collaboration platforms<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">SRV records play an important role in DNS by directing applications to the appropriate server and port for a service. Understanding how SRV records work helps administrators configure communication services, improve reliability, and manage traffic efficiently across multiple servers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><\/a><\/span><\/span><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size wp-block-paragraph\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>DNS does more than connect domain names to IP addresses. It also helps applications locate the exact servers and ports required for specific services. This is where SRV records come&hellip;<\/p>\n","protected":false},"author":4,"featured_media":17266,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-576","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-miscellaneous"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=576"}],"version-history":[{"count":4,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/576\/revisions"}],"predecessor-version":[{"id":17267,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/576\/revisions\/17267"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media\/17266"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}