Posts

Showing posts from December, 2024

Step-by-Step Guide to Create a Subdomain

To create a subdomain for a domain hosted on GoDaddy or different account but managed under a different account without transferring the domain, follow these steps: Step-by-Step Guide to Create a Subdomain 1. Understand Your Setup Domain Registrar: The domain is managed in a different account (e.g., Godaddy, or another registrar). Hosting Provider: Your hosting is in your GoDaddy account. Objective: Create a subdomain (e.g., sub.example.com ) and point it to your hosting server. 2. Access the DNS Management of the Domain Login to the account where the domain is managed. Navigate to the DNS Management or DNS Zone Editor of the domain. 3. Add an 'A' or 'CNAME' Record for the Subdomain 'A' Record Method: Add a new 'A' record in the DNS settings. Set the subdomain (e.g., sub ) in the Name/Host field. Enter the IP Address of your GoDaddy hosting server in the Value field. Save the record. 'CNAME' Method: Add a CNAME record in the DNS se...

Constraints in MySQL

Constraints in MySQL are rules enforced on data in a database to ensure its accuracy, integrity, and consistency. They are applied at the table column or table level to restrict the type of data that can be stored. Constraints help prevent invalid data entry and maintain relational database integrity. Types of Constraints in MySQL 1. NOT NULL Constraint Ensures that a column cannot have a NULL value. Used to ensure that important fields always contain data. Syntax: CREATE TABLE students ( id INT NOT NULL, name VARCHAR(50) NOT NULL ); Example: If you try to insert a record with a NULL value in the name column, it will result in an error: INSERT INTO students (id, name) VALUES (1, NULL); -- This will throw an error 2. UNIQUE Constraint Ensures that all the values in a column are distinct (no duplicates allowed). Multiple UNIQUE constraints can be applied to a table. Syntax: CREATE TABLE employees ( emp_id INT UNIQUE, email VARCHAR(100) UNIQUE ); E...

Array In JavaScript

An Array in JavaScript is define as a data structure used to stored multiple value of different datatypes, means array in javascript can hold different datatypes in single variable. Indexing of Array Element starts from 0 (ZERO). 2 Different ways to create of Array In JavaScript: Creating Literal array: // Creating an Empty Array let arr = []; console.log(arr); // Creating an Array and Initializing with Values let arr= [10, "sahiba", 32]; console.log(arr); Create using new Keyword (Constructor):      // Creating and Initializing an array with values let arr = new Array(1, "sahiba", true); console.log(arr); Operations to perform on Array: Length of an array: let arr = [1, "sahiba", true]; console.log(arr.length); Get First Value of an array: let arr = [1, "sahiba", true]; console.log(arr[0]); Get Last Value of an array: let arr = [1, "sahiba", true]; console.log(arr[arr.length-1]); Print all values of an array: Using loop:  let arr = [1,...

My SQL Summerized

FUNCTIONS IN MY SQL: NOW() FUNCTION:            This query shows the current date and time.  SELECT NOW(); SUM() FUNCTION: SELECT SUM(column_name) as new_name FROM table_name;           WITH WHERE CLAUSE: SELECT SUM(column_name) as new_name FROM table_name WHERE condition;  

On-Page SEO

 On-Page SEO refers to the process of optimizing the webpages of a website to rank higher and attack more traffic in the search engine. make Website Design Better and improve content. Key Elements of On-Page SEO: Keyword Optimization: List of Targeted keywords Title Tags: primary keywords. because The title tag is the clickable link on a search engine results page (SERP) Meta Tags: these HTML tags use to provide extra information about the website to google. These tags we put it on head section. URL Structure: Use short, clean and keyword rich URLs. Heading Tags: Content should be organized with heading. only one H1 tag must be there on each page. Content Quality: Create valuable, original, relevant content for you audience Image Optimization: images should be Compressed, (convert to webp), Image File name, Alt text with keyword. Internal linking: also known as inbound  External Linking: also known as outbound Mobile Responsiveness: Page Load Speed: Canonical Tags: P...